I would stick with the existing structure just not to get any headaches in the long run. The MVC structure is proven to work just fine. However, you can place your code anywhere you like as long as you keep the namespaces up to date with that structure, be aware that you might need to make changes in some vendor files if you move stuff around.
Change Laravel structure (User in DDD)
Hi... it is one of the days I think about something, which is not really a problem... but keeps me away from go on working :) and I wanted to ask, what you think.
I work on an app, where i know there will be a lot of code. So I started to learn some new things... like DDD. I think about structure for Application code and Domain code and I think about the user (and also fortify, which is placed in App\Actions), which comes out of the box with laravel. I want to restructure the user and put it in "Domains\User\Models\User.php" instead of app\Models\User. Also Fortify or Middleware like Authenticate should moved to this domain. Or maybe Fortify actions into App\Customers\Actions.... Not sure, but what would you think about moving it from moving the user stuff also in a structured way instead just do a better structure for everything else and leave only users in the "normal" structure... will there be maybe other problems I dont think of now in the future if i restructure it?
Please or to participate in this conversation.