Fareez Ahamed

Tag: Laravel (3)

Authenticate Users from Multiple Tables in Laravel

Jan 14, 2021

It is a common practice to store different user types in different database tables. For example, in most applications you will have an Admin user and a normal user. Though we can have all the users in a single table and discriminate them based on a column, sometimes if the fields are quite different, we would like to have different table for each type of user.

Read more...

Extending Blade for Role Checks in Laravel

Oct 27, 2019

Displaying parts of view based on conditions is super easy in Blade using @if ... @endif conditions. Imagine we are storing the role information as a string in the User model under the role field. We would write something as shown below to check the roles in the blade syntax.

Read more...

Bootstrap Sass in Laravel 5

Apr 3, 2015

Laravel 5 ships with Bootstrap 3 by default, but it uses Less and not Sass. Personally I prefer Sass over Less and this article helps you set up Bootstrap Sass using Bower and Laravel Elixir.

Read more...