I want to call static functions inside controller class from web.php.
In Controller,
enter code here
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class RoutePackageController extends Controller
{
static function callingroutes() {
Route::group(array('prefix' => 'account'), function() {
Route::get('/userhome', function()
{
return view('welcome');
});
});
}
}
In web.php,
\App\Http\Controllers\RoutePackageController::callingroutes();
But it throws exception errors.
[Symfony\Component\Debug\Exception\FatalThrowableError] Class 'RoutePackageController' not found
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2uHj3Go
via IFTTT
Aucun commentaire:
Enregistrer un commentaire