Similar Posts
User Roles Many to Many
Another way to design user roles in your application is to create a many to many relationship. This means many users can have many roles.
Laravel Episode 5: MySQL and Auth Design
Episode 5: MySQL and Auth Design Show how to configure MySQL Create a database Create a user specific to the database Design the Users and Roles table Move roles migration file so it is created before users – rename it Edit user migration file so it uses role_id as foreign key Create log in…
Laravel Dev Environment in Ubuntu 18.04
Here is how to set up a Laravel dev environment on Ubuntu 18.04 LTS Bionic Beaver.
Laravel Episode 9: Middleware Roles
Episode 9: Middleware Roles Create a migration file for staff role and default staff account. php artisan make:migration create_staff_role_and_default_new_user Code the new migration file. public function up() { // create new staff role DB::table(‘roles’)->insert( [ ‘id’ => 2, ‘role_name’ => ‘staff’ ] ); // create default user for staff DB::table(‘users’)->insert( [ ‘username’ => ‘staff’, ’email’…
Laravel with InertiaJS
I’m not sure when this whole backend vs frontend battle started in my head. But I’m mainly a backend developer. Ever since I started development, I mainly focused on data structure and coding. I rarely paid attention to any of the frontend elements. My main focus were to ensure that my code worked as expected….
User Roles One to Many
There are many ways to handle user roles in an application. One way is to create a role(s) that have many user(s) or a one to many relationship.