Author: Admin

  • Authentication and Tips

    Here’s a quick explanation on how you go about Authentication and some tips. Building Registration & Login Forms Defining Authentication Routes and Controllers Displaying Content Conditionally Use Blade directives to show login and register links only to guests: Use @auth to show content only to authenticated users. Registration Process When a user submits the registration form, the following…

    Read More

    //

  • Route Tips

    Here are a few tips and techniques for your routes file to help keep it clean, maintainable and efficient. 1. Route Model Binding Instead of manually fetching models by ID in your route closures, Laravel offers route model binding to automatically inject model instances based on route parameters. For example, change this: To this: Key points: Update…

    Read More

    //

  • HTTP Request Methods

    There are a bunch of different request methods in Laravel but your browser doesn’t support all of them so here’s how to trick it. Initially your browser only supports “get” and “post” requests but most common frameworks (therefor Laravel) understand a few more. Let’s look at “patch” (update) and “delete”. Now let’s say you have…

    Read More

    //