Problem is you don't always know what Google thinks is stupid.. And what it tomorrow thinks is stupid.
Sure, it will helps not doing stupid things like black hat SEO, but even over optimizing on keywords, topic selection based to semrush/shrefs trafic estimations can lead to lower rankings when done to much.
Also writing content for the sake of adrevenue is not as stable as it was since the "helpful content" updates that have rages the rankings last 2 years.
I did my fair share of "niche" content sites to know it can go up and down very fast. Admin it, not every content was very good, but it was not that bad for complete de-ranking.
I think you do a good job. You have authority, don't write like a robot and I don't think you use AI.
But even 1 or 2 competitors rivaling on your keywords can make your life a real hell if your mortage depends on your Google traffic..
So yes SEO is cool, but don't rely on it. You don't own the trafic. Stay relevant, stay unique, stay trustworthy, and you do right a lot already. Keep your Twitter traffic afloat and try other sources like facebook, reddit etc.
Become a brand. Make people searching for you as wel.
Again, I think you do pretty good, but don't sleep in it. Nothing is free, neither Google trafic.
@mateusjatenee I have to admit I struggle with this a lotโฆ I donโt like to leak the database into my domain. But when you have methods like this, you are still hiding the data and only exposing behavior.
@_newtonjob I prefer to never redirect outside the controller/middleware layer..
Always a pain the find the direct when it is deploy buried in your domainโฆ
@aarondfrancis So than it is not that deep in the stack?
If it does not hit the controller... A middleware would be my second candidate...
We need more context, but I think you know what you are doing :)
@loudncleario@aarondfrancis I read deep into the http stack, as in deep into the business domain...
So yeah... it might not left the http layer..
But still....
Reads as a design issue...
Lets wait for the video ;)
I think I would prefer to throw a dedicated "domain" exception with a good name.
Than catch that exception in your controller(http layer) and do a redirect there.
What if your "deep domain" code is used in a console?
You can than handle the exception differently.
In your domain unit tests you can just test that an exception is thrown with $ this->expectException() under the right circumstances.
I would also not let the request leak into my domain.
As I read your Post, this feature is more that a simple CRUD where you update an Eloquent record...
If you need data from the request, you might consider a DataTransferObject, of if the parameters are just a few, pass them to the domain as method parameters..
I would advise to keep http in the http layer: Controllers, Middleware, Requests, Responses.
You never know how you gonna use your business later: command line, other modules that need to use the functionality..