LARAVEL BLOG

The RESTful Approach

Our app represents a good example of the RESTful API, so what is that and why it is appropriate. Controller’s Methods HTTP Verb Path (URL) Action (Method) GET /results index GET /results/create create POST /results store GET /results/{result} show GET /results/{result}/edit edit PUT /results/{result} update DELETE /results/{result} destroy Tip: In the CLI we can run php artisan […]

Read More…

Phase 3 – Authentication & Authorisation

Authentication is checking who a user is. Authorisation is checking what a user can do. Authentication Laravel comes with authentication out of the box, I used the following two simple commands: This will scaffold all of the routes and views we need for authentication, as below: And our app’s right corner is having the following two buttons: The Authenticated User From […]

Read More…

Phase 4 – The Extras

Adding User Profile Page I added a new blade with corresponding controller and route to show some information about the current logged in user, along with his contribution to the site, how many results and how many flags (file) did he upload. I did two SQL queries in the controller to know about these two […]

Read More…

Tips & Tricks

Starting the App To set up a local PHP environment and launch our Laravel app we can run the following CLI command inside the project folder: Artisan Help! Type the following command to get all the available Artisan available commands: Using Log for Debugging Emails If we want to test the Email sending feature in […]

Read More…

Conclusion and Future Plan

Conclusion Laravel is quite a nice framework, we can build applications quickly with it as it offers scaffolding commands and easy to build solutions. It is easy to learn with tons of tutorial and well-explained documentation. It also fulfils the requirements for modern web applications such as authentication authorisation, email handling, CRUD, RESTful, MVC and […]

Read More…