Server IP : 66.29.132.124 / Your IP : 18.219.150.195 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/routes/ |
Upload File : |
<?php // Admin Route /*Route::group(['prefix'=>'admin','middleware' => ['auth','dashboard']], function() { Route::match(['get','post'],'/',function (){ $module = ucfirst(htmlspecialchars('Dashboard')); $controller = ucfirst(htmlspecialchars($module)); $class = "\\Modules\\$module\\Admin\\"; $action = 'index'; if(class_exists($class.$controller.'Controller') && method_exists($class.$controller.'Controller',$action)){ return App::call($class.$controller.'Controller@'.$action,[]); } abort(404); }); Route::match(['get','post'],'/module/{module}/{controller?}/{action?}/{param1?}/{param2?}/{param3?}',function ($module,$controller = '',$action = '',$param1 = '',$param2 = '',$param3 = ''){ $module = ucfirst(htmlspecialchars($module)); $controller = ucfirst(htmlspecialchars($controller)); $class = "\\Modules\\$module\\Admin\\"; if(!class_exists($class.$controller.'Controller')){ $param3 = $param2; $param2 = $param1; $param1 = $action; $action = $controller; $controller = $module; } $action = $action ? $action : 'index'; if(class_exists($class.$controller.'Controller') && method_exists($class.$controller.'Controller',$action)){ $p = array_values(array_filter([$param1,$param2,$param3])); return App::call($class.$controller.'Controller@'.$action,$p); // return App::make($class.$controller.'Controller')->callAction($action,$p); } abort(404); }); });*/