Author Page

Laravel, My first blogger’s App with authorization

Laravel, My first blogger’s App with authorization   A Usage Example In this post, we’ll make a toy posts app to show how Gate gives you liberty and decoupling. The web app will have two user roles (authors and editors) with the following permissions: Authors can create a post. Authors can update their posts. Editors can update any post. Editors can publish posts. Creating a New Laravel Project 01 From the command line enter the following. laravel new blog or using composer enter composer create-project –prefer-dist laravel/laravel blog .env File Configuration 02 Configure the .env file to give Laravel access to your database. … APP_URL=http://localhost:8000 … DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=localhost DB_USERNAME=dbusername DB_PASSWORD=dbpassword … Database 03 Create a post model. Adding -m and -c arguments…

Read more...