简体   繁体   中英

PHP Laravel 5.1 Bootstrap file

so I'm very new to laravel (I'm talking like new born baby new) and I'm using laravel 5.1. I come from a groovy/grails background and with Grails you have a file called Bootstrap in which you can instantiate objects when you start the server. I was wondering if laravel has some sort of equivalent coz with the system I'm trying to build you need to be able to register users and each user has to have a role associated with him. I'm trying to create these roles in the bootstrap file so then on user creation I can just tie a reference between the user and his role. If laravel has an equivalent bootstrap file where would I find it, as far as I know I just did a default laravel installation so assume that it uses a default file structure.

Any help would be appreciated and let me know if you require any further info.

Well i think first thing you should be learning is read about flow and directory structure of Laravel . There are tons of article for them .

You should know what routes , middleware , controller , views do and how they are related and from where they get called .

It will simply answer your question.

Or simply check what SO have for you https://stackoverflow.com/tags/laravel/info

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM