Laravel 11: A new streamlined directory structure!

preview_player
Показать описание
You’ll love the slim application skeleton you start with in a new Laravel 11 app! Newcomers will appreciate the minimalism, and experienced developers upgrading will not experience breaking changes.

Video Links:

⏰ Timestamps: Laravel 11: New Streamlined Application Skeleton

0:00 - Laravel 11 introduction
0:35 - Install Laravel 11
1:25 - Sqlite as the default database driver
1:58 - Comparing Laravel 10 and Laravel 11
2:20 - The new Laravel 11 app directory
3:30 - Laravel 11 config directory
3:47 - Publishing your Laravel 11 config
4:34 - Laravel 11 migration changes
5:24 - Laravel 11 routes files
5:40 - How to bring back API routes
6:20 - Laravel 11 console kernel
6:49 - New Laravel 11 Model casts are a method
7:30 - Conclusion

----------------------------------------------------------------------
JOIN OUR WEEKLY LARAVEL NEWSLETTER
----------------------------------------------------------------------

#laravel11 #laravelphp #laraveltutorial
Рекомендации по теме
Комментарии
Автор

Too many essential stuff gone or hidden... confusing.

cabanelas
Автор

It looks like someone just went to my room, moved the staff into the closet, and now I have to get everything back.

guramikutivadze
Автор

To say that most people don't use Laravel API routes look a little strange for me, at least considering my experience... But since it's still possible to easily implement those and Laravel documentation is usually well done and explained with lots of use cases, seems like a nice simplification for those who are starting with the framework and doesn't need all those features from the beginning

gkrondon
Автор

I am worried that newbies will not know about all the features that Laravel has built in and reinvent the wheel. I've seen it with Laravel < 10 projects. So it will be a lot more common now that a lot of things are hidden.

ciberman
Автор

Laravel 11: we've spent a year deleting stuff so you can spend more time looking up console commands to bring it back when you install Laravel. This is the definition of busywork.

jaspercaelan
Автор

Just before the release of the Laravel 11, Taylor Otwell just decided to give back some basic necessary config files in config directory so these are now available

amkashif
Автор

I can't think of single actual benefit to the streamlined structure. For those of us that use config, mysql, kernel, middleware, console commands, api routes, we now have to go through the cost of rearranging our applications to what benefit? 0. Having a dedicated folder for middleware makes a lot of sense. One of the great things about Laravel is how intuitive everything is. Laravel 11 is working against that. To restructure our applications for Laravel 11, big pain, little to 0 benefit. Still wondering if I should do it.

evercode
Автор

Personally i dont like the idea that much, i like to hace configuration and structure of the app at hand, so i can see what options i have and better decide.

I feel like that is something i like much about Laravel so far. That i can see the configuration of my app at first sight.

I mean, Laravel is not a minimal framework, it it a batteries included one, i like to see all the bateries at my disposal hahaha.

I would propose that at least there should be an artisan command to bring back all the configuration files and options to where they are now as of Laravel 10.

Maybe its just me but man, this is not a js framework :(

EnriqueMunoz-nofq
Автор

it also make some changes to the migration other that keeping then in order they make the session table by default created and also summed all of the tables related to the users as an example in one migration and also they added a new migration for cache and this is not found in laravel 10

devopsdevelopoptions
Автор

What happens if you need to fully customize / override middleware groups? I've only seen prepend and append methods in the new bootstrap.php. I have tenancy middleware that needs to go in the middle of the default web and api stacks.

binaryfire
Автор

I was so hopping to have 'app' => 'src', or at list framework's code fixed so it won't break when you change it.

MadalinIgnisca
Автор

I'm still having mixed feelings about this change

kreatur_
Автор

I just got laravel 11 working with sail just to notice that using sail the folder structure is still the same as in 10...

krakatoom
Автор

pls, you use theme extension of visual studio code ?

mr.codehappy
Автор

font ar too small, you should care about it

bugszone
Автор

Very cool. I like the clean structure. One weird thing is to have the console cron schedules under routes. It would probably be better to have the api routes and console in the App/Console folder.

kwyaza
Автор

If something works for a long time, DON'T TOUCH IT AND DON'T CHANGE IT :D

WiseGuy
Автор

so you can just extend configuration files?

fafaratze
Автор

Will any config files you add be merged with the default configs of the same name? Eg. let's say you created 'config/database.php' and only defined the redis array - would that work?

binaryfire
Автор

What is happening is that, Laravel Team realized they were giving away too much thing for free and now they are cutting back, hiding things and making everything difficult to find. This the road to make more core stuff behind paywall.

regisk