Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

123123123123123523432131341341231234513123123123's avatar

What are your thoughts on the new structure in the Laravel develop branch?

0 likes
41 replies
thepsion5's avatar

I actually really like it, because it's similar to the way I do things already.

/app/ for connecting your core application code to the Laravel framework /resources/ for templating and "dumb" code /storage/ for managing files a generated by laravel

It makes it really easy for me to find and store all of my domain logic in a /src/ folder.

xingfucoder's avatar

Hi @thepsion5,

With the new possible structure, where do yo store your Entities of your domain layer (for big projects) or Models (for small projects) if you have an app and a src folder?

Thanks in advanced.

pobble's avatar

Not keen. I like Laravel and all it's goodies being in it's own place. But I can see how it's all a bit more organised. Like most things, I'm a stick in the mud but come round eventually

unitedworx's avatar

Taylor talked about this in a podcast a week or so ago and a major thing he said is that this is backwards compatible.

So this new structure won't be forced to anyone that prefers the existing structure.

There are a lot more paths configurable now in the develop brach so someone can move things around a bit more easily without hacking things here and there.

I really like the providers included in the app/provides that will allow us to add our app filters, error handlers, event handlers etc etc

1 like
JeffreyWay's avatar

@jelle - It's a big improvement. Once folks get beyond the initial "wait, where did this go" reaction, I think they'll find that the structure is much more intuitive.

4 likes
aesmith's avatar

What is the point of the app directory with this structure?

anchour's avatar

Yeah, I dig the new structure. The app folder feels more like my actual app, rather than "oh, here's my controllers/models, plus my tests, and then storage and some other stuff that isn't really relevant."

1 like
NormySan's avatar

I like it, and it will bring better configuration options for the folder structure. I like how app is now namespaced with psr-4 so you can completely get rid of the app folder and rename it to the apps domain name instead.

1 like
ax3lst's avatar

Is there any explanation about the new file structure?

aesmith's avatar

@ax3lst I'm sure there will be when it's released. This is only in the dev branch.

JeffreyWay's avatar

Next week, I'm going to be working on a lot of 4.3-specific content. I want Taylor to announce all the new stuff first at Laracon, but then, right after that, you'll see a burst of videos at Laracasts.

...Not to mention that the "Laravel From Scratch" series will be 100% refreshed.

30 likes
thepsion5's avatar

With the new possible structure, where do yo store your Entities of your domain layer (for big projects) or Models (for small projects) if you have an app and a src folder?

>

Thanks in advanced.

All of my domain code would go in the src folder.

@JeffreyWay Awesome!

JeffreyWay's avatar

There will be a new Artisan command, where you can rename the app directory to whatever you want. So I'd rename mine to "Laracasts."

2 likes
freekmurze's avatar

I like the new structure a lot. Is there already a release date for 4.3?

JeffreyWay's avatar

@freekmurze - November, but you'll be able to use it much sooner than that. That's just the official release date.

JeffreyWay's avatar

@freekmurze - It's already pretty stable. But, sure, for your big production app, you're free to hold off. I'm just saying that folks can toy with it right now, if they want.

2 likes
HRcc's avatar

I will need some time to get used to new structure when searching for files manually or creating new files, but it looks reasonably updated taking into consideration needs of current developers. I definitely like it.

pakuize's avatar

I am really looking forward to it, it does seem a lot more organised. It has always been a irritation to me that everything was located in the app folder.

alfonsan's avatar

@JeffreyWay - Are you planning on a lesson for Larabook and the (unfinished?) API about moving them from 4.2 into 4.3?

Another quick question. The new version of Laravel is going to make the backward lessons in Laracasts a bit confusing because of the new directory structure. Are you planning to tag each version with the Laravel version used on them?

JeffreyWay's avatar

@alfonsan - Larabook will stay on 4.2, and, yes, I'm going to tag lessons, according to the version number used.

1 like
bacondrinker's avatar

@JeffreyWay Once the Larabook series has been completed would it be possible to do a video on the migration path from 4.2 to 4.3 (including moving to the new folder structure)

While a general video on the move from 4.2 to 4.3 would be awesome, I think moving a more complex app like Larabook could provide some useful tips, if it is any different from moving a simple app.

Thanks Jeffrey! :p

ross.edman's avatar

I like the structure. Really like that the whole app directory is ps-4 loaded. Will make it more flexible for different style of development. I think the resources folder is kind of overkill and out of place but I also can understand it and am excited to see how it's used more. Plus I'm sure all of that is configurable so who cares what I think

codeforest's avatar

Awesome stuff there. I think that using an IDE like PHP Storm will be very helpful at the beginning while searching "where is my routes file" and stuff :)

dammyammy's avatar

Feels Well Thought Out. It Shouldn't be that hard to get used to It.

Next

Please or to participate in this conversation.