{"id":5714,"date":"2021-03-22T12:59:35","date_gmt":"2021-03-22T12:59:35","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=5714"},"modified":"2021-03-24T09:34:45","modified_gmt":"2021-03-24T09:34:45","slug":"using-role-based-authentication-create-different-users-dashboard","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/","title":{"rendered":"Using Role Based Authentication, Create Different Users DashBoard"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:25px\"><strong>Prerequisite<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>i.<\/strong><\/em> Create a project in C:\/xamp\/htdocs directory by using Git Bash. To create a new project run the following code in Git Bash terminal<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncomposer create-project --prefer-dist laravel\/laravel project_name &quot;5.8.*&quot;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><em><strong>ii.<\/strong><\/em> Open the project in your  code editor like VS Code<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-1 <\/em><\/strong>: To use User Authentication in your project run the following code in code editor terminal<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan make:auth\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-2<\/em><\/strong> :&nbsp;Customize users table to add role field in the table. Go to <strong>database\/migration\/2021_03_20_000000_create_users_table.php<\/strong>  and make some changes in users table.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/5913750b67b4531d9f74933197e93d83.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-3:<\/em><\/strong> Create a Role Model and Migration for Role Table by using the following code:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan make:model Role -m\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-4:<\/em><\/strong> Now customize the Role table and add role_id and role_name field .Go to <strong>database\/migration\/2020_03_20_060108_create_roles_table<\/strong> and make some changes in up() function.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/5856ac193551c138df4c3527b80c8f27.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-5<\/em><\/strong>: Make Relationship between Users and Roles tables through Role Model and User Model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>i.<\/em><\/strong> To create relationship make changes in users( ) function in Role.php.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/1919814036da6d0c0852e8694e12b813.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>ii. <\/em><\/strong>In User.php make a role( ) function and write the following code .<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/28344e1b75fe29904e4df89269fd4c7b.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-6<\/em><\/strong> : &nbsp;Create&nbsp;<strong>UsersTableSeeder<\/strong>&nbsp; and <strong>RolesTableSeeder<\/strong> file  by writting following two command in terminal.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan make:seed UsersTableSeeder\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan make:seed RolesTableSeeder \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-7:<\/em><\/strong>  Add Insert function in UsersTableSeeder.php and RolesTableSeeder.php file for Insert data in&nbsp;<strong>users<\/strong>&nbsp;table and <strong>role<\/strong> table. Add &#8221; <strong>use&nbsp;Illuminate\\Support\\Facades\\DB; <\/strong>&#8221; in use area.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>i.<\/em><\/strong> Go to<strong> database\/seeds\/UsersTableSeeder.php<\/strong>  and add the following insert operation in run( ) function :<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/a6b312b8975252fb4f3d82e275a0aa90.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>ii. <\/em><\/strong>Go to<strong> database\/seeds\/RolesTableSeeder.php<\/strong> and add the following insert operation in run( ) function :<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/7cc9900156f526479ad66da72c5393da.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-8 :<\/em><\/strong> Create a new Database and link it with the project<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>i.<\/em><\/strong> Run Apache and MySql .<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>ii. <\/em><\/strong>Open <strong><a href=\"http:\/\/localhost\/phpmyadmin\/\">phpmyadmin\/localhost<\/a><\/strong> in your web browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>iii. <\/em><\/strong>Create a new database and set its name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>iv.<\/em><\/strong> Set Mysql Server Username ,Password and Database Name in<strong>&nbsp;.env<\/strong>&nbsp;file <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">    DB_CONNECTION=mysql<br>    DB_HOST=127.0.0.1<br>    DB_PORT=3306<br>    DB_DATABASE=multipleuser (Your DB name)<br>    DB_USERNAME=root<br>    DB_PASSWORD=<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>v. <\/em><\/strong>Migrate it by following command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan migration\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-9 :<\/em><\/strong> Insert data in the table<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan db:seed\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-10:<\/em><\/strong> Create&nbsp;<strong>DashboardController<\/strong>&nbsp;for Admin Dashboard work and User<strong> <\/strong>Dashboard&nbsp;work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>i.<\/em><\/strong> For Admin Dashboard<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan make:controller Admin\/DashboardController\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong><em>ii.<\/em><\/strong> For User Dashboard<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan make:controller User\/DashboardController\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-11 :<\/em><\/strong>&nbsp;Make&nbsp;<strong>AdminMiddleware<\/strong>&nbsp;and <strong>UserMiddleware<\/strong> for Admin&nbsp;and User Authentication&nbsp;work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>i. <\/em><\/strong>For AdminMiddleware<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan make:middleware AdminMiddleware\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong><em>ii.<\/em><\/strong> For UserMiddleware<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp artisan make:middleware UserMiddleware\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-12:<\/em><\/strong> Go to <strong>app\/Http<\/strong> directory and  Use<strong>&nbsp;Auth<\/strong>&nbsp;class for Authentication in&nbsp;<strong>AdminMiddleware.php<\/strong> and <strong>UserMiddleware.php<\/strong> in use section. Implement  the following condition in handle( ) function:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">i. In <strong>AdminMiddleware.php<\/strong> add the following codition:<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/ecbf30adf9c2eb08f55b0dac38593739.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\">i. In <strong><strong>UserMiddleware.php<\/strong><\/strong> add the following codition:<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/50b04820f49d195010303aa6be0f650f.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-12:<\/em><\/strong> Go to <strong>app\/Http\/Middleware\/RedirectIfAuthenticated.php<\/strong> . Implement Condition for&nbsp;<strong>Admin<\/strong>&nbsp;and&nbsp;<strong>User<\/strong>&nbsp;Login in <strong>RedirectIfAuthenticated.php<\/strong>. and not forget to put &#8221; <strong>use Auth;<\/strong> &#8221; in use section.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/945590dea6a321d5f0152fb127c5dd9b.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-13:<\/em><\/strong> Go to <strong><strong>app\/Http\/Controllers\/Auth\/<\/strong><\/strong> directory and remove&nbsp;<strong>= \u2018\/home\u2019<\/strong>&nbsp;from protected&nbsp;<strong>$redirectTo = \u2018\/home\u2019;<\/strong> for <strong>ResetPasswordController.php<\/strong> and <strong>LoginController.php<\/strong> . Implement Condition&nbsp;<strong>Login<\/strong> in both  php file in <strong>__construct( )<\/strong>  function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>i.<\/em><\/strong> In <strong>LoginController.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/f4dccf6727f0e4adb8a7bed7f627deab.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>ii.<\/em><\/strong> In <strong>ResetPasswordController.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/405415edc6e3c63bc622a98f59547579.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-14<\/em>.A : <\/strong> Use <strong>AdminMiddleware<\/strong> and&nbsp;<strong>UserMiddleware<\/strong>&nbsp;in&nbsp;<strong>Kernel.php<\/strong>&nbsp;File in <strong>app\/Http\/Kernel.php<\/strong> directory<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">i. For <strong>AdminMiddleware<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nuse App\\Http\\Middleware\\AdminMiddleware;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">ii. For <strong>UserMiddleware<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nuse App\\Http\\Middleware\\UserMiddleware;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Step-14.B :<\/em><\/strong> Define&nbsp;<strong>AdminMiddleware<\/strong> and <strong>UserMiddleware<\/strong> in&nbsp;<strong>routeMiddleware<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">i. For <strong>AdminMiddleware<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#039;admin&#039; =&gt; AdminMiddleware::class,\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">ii. For <strong>UserMiddleware<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nuse App\\Http\\Middleware\\UserMiddleware;\n<\/pre><\/div>\n\n\n<script src=\"https:\/\/gist.github.com\/SushantoSingh\/3d4cdc571ad7e24558e0f717d270a4a3.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisite: i. Create a project in C:\/xamp\/htdocs directory by using Git Bash. To create a new project run the following [&hellip;]<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5049],"tags":[5052,177],"class_list":["post-5714","post","type-post","status-publish","format-standard","hentry","category-laravel","tag-laravel","tag-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using Role Based Authentication, Create Different Users DashBoard - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Role Based Authentication, Create Different Users DashBoard - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Prerequisite: i. Create a project in C:\/xamp\/htdocs directory by using Git Bash. To create a new project run the following [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-22T12:59:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-24T09:34:45+00:00\" \/>\n<meta name=\"author\" content=\"Sushanto Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sushanto Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/\"},\"author\":{\"name\":\"Sushanto Singh\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/219f8141ec0cb3cd99db5777881c372b\"},\"headline\":\"Using Role Based Authentication, Create Different Users DashBoard\",\"datePublished\":\"2021-03-22T12:59:35+00:00\",\"dateModified\":\"2021-03-24T09:34:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/\"},\"wordCount\":536,\"commentCount\":0,\"keywords\":[\"laravel\",\"Php\"],\"articleSection\":[\"Laravel\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/\",\"name\":\"Using Role Based Authentication, Create Different Users DashBoard - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2021-03-22T12:59:35+00:00\",\"dateModified\":\"2021-03-24T09:34:45+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/219f8141ec0cb3cd99db5777881c372b\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/using-role-based-authentication-create-different-users-dashboard\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Role Based Authentication, Create Different Users DashBoard\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/219f8141ec0cb3cd99db5777881c372b\",\"name\":\"Sushanto Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/78c829f20bbef91fbfb2a300223da33f61f59203b5dde27bd6cb6e93e0eb0361?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/78c829f20bbef91fbfb2a300223da33f61f59203b5dde27bd6cb6e93e0eb0361?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/78c829f20bbef91fbfb2a300223da33f61f59203b5dde27bd6cb6e93e0eb0361?s=96&d=mm&r=g\",\"caption\":\"Sushanto Singh\"},\"sameAs\":[\"rajeshkumar\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/sushantodev\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Role Based Authentication, Create Different Users DashBoard - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/","og_locale":"en_US","og_type":"article","og_title":"Using Role Based Authentication, Create Different Users DashBoard - scmGalaxy","og_description":"Prerequisite: i. Create a project in C:\/xamp\/htdocs directory by using Git Bash. To create a new project run the following [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/","og_site_name":"scmGalaxy","article_published_time":"2021-03-22T12:59:35+00:00","article_modified_time":"2021-03-24T09:34:45+00:00","author":"Sushanto Singh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sushanto Singh","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/"},"author":{"name":"Sushanto Singh","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/219f8141ec0cb3cd99db5777881c372b"},"headline":"Using Role Based Authentication, Create Different Users DashBoard","datePublished":"2021-03-22T12:59:35+00:00","dateModified":"2021-03-24T09:34:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/"},"wordCount":536,"commentCount":0,"keywords":["laravel","Php"],"articleSection":["Laravel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/","name":"Using Role Based Authentication, Create Different Users DashBoard - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2021-03-22T12:59:35+00:00","dateModified":"2021-03-24T09:34:45+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/219f8141ec0cb3cd99db5777881c372b"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/using-role-based-authentication-create-different-users-dashboard\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Using Role Based Authentication, Create Different Users DashBoard"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/219f8141ec0cb3cd99db5777881c372b","name":"Sushanto Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/78c829f20bbef91fbfb2a300223da33f61f59203b5dde27bd6cb6e93e0eb0361?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/78c829f20bbef91fbfb2a300223da33f61f59203b5dde27bd6cb6e93e0eb0361?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/78c829f20bbef91fbfb2a300223da33f61f59203b5dde27bd6cb6e93e0eb0361?s=96&d=mm&r=g","caption":"Sushanto Singh"},"sameAs":["rajeshkumar"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/sushantodev\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=5714"}],"version-history":[{"count":6,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5714\/revisions"}],"predecessor-version":[{"id":5756,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5714\/revisions\/5756"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=5714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=5714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=5714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}