You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serverfire edited this page Dec 26, 2018
·
1 revision
Add A Customized Controller And View
If you need to create a customized controller and view under panel, please read this section.
First create a controller and extend it from the Controller class (instead of the CrudController), for example if the controller is named TestCustomController :
<?php
namespace App\Http\Controllers;
class TestController extends Controller
{
public function all($entity)
{
return view('test_custom_view');
}
public function __construct() { }
public function index()
{
// Code
return view('test_custom_view');
}
}
Then you should create your view file, for example if your view is named test_custom_view, create the test_custom_view.blade.php file under the resources/views folder and to load templates of panel, you should include the following lines in your view file :