Support the ongoing development of Laravel.io →
Blade Architecture
Last updated 1 year ago.
0

Just follow the 4 step to create admin panel with laravel 5. This is nothing but just a interface which restricted by authentication process to provide site-wide control.

1 Create a required folder structure to maintain/separate all admin stuff:
Create folder called 'Backend' which contain admin related files/folder separately. So the structure look like app/Http/Controller/Backend to store all admin controllers

app ⥱ Http ⥱ Controllers ⥱ Backend ⥱ LoginController.php  

and resources/views/backend to store all admin views.

app ⥱ resources ⥱ view ⥱ backend ⥱ login.blade.php  

2 Declare route to handle route request for admin action
Create route group for admin control. Here you need to pass all admin request passed through route group so this will help.

// Route Group 'Backend': route to show the login/register form  
Route::group(array('namespace'=>'Backend'), function()  
{
    Route::get('/admin', array('as' => 'admin', 'uses' => 'LoginController@index'));
    Route::get('/admin/register', array('as' => 'register', 'uses' => 'LoginController@register'));
});

3 namespace declaration and first login controller:
namespace for admin panel look like below.

namespace App\Http\Controllers\Backend;  

Now create a first controller under 'app/Http/Controller/Backend/LoginController.php' to control the admin login form actions.

<?php namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;

/**
 * Class LoginController
 * @package App\Http\Controllers\Backend
 */ 
class LoginController extends Controller {
  public function index() {
    return \View::make('admin.login');
  }
}

4 Use URL:
http://yourdomain.com/admin to open admin panel login form

Now this is the basic stuff that require for admin access. Further you can create more views/controller as per your requirement OR you can take approach of use ready backend like http://demo.serverfire.net/panel/login from here

Last updated 7 years ago.
0

Hi, alankar1985

Here bellow link you can create admin panel step by step : http://itsolutionstuff.com/post/laravel-5-create-quick-backend...

0

Well, I'll advise you Voyager, it's excellent

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.