dimanche 17 février 2019

could not find test routes i made in my laravel request file when i run artisan route:list

i installed Laravel, made new controller and new request.I added a test routes in the request file but whenever i try to access it from the browser via Apache WAMP server it through NotFoundHttpException(1/1)

i tried modifying the Apache httpd.conf file AllowOverride ALL Require all granted i tried php artisan route:clear and route:cache i tried to access the route through different URLs public/home public/index.php/home not working however localhost/public loads laravel welcome page just fine i opened config/app.php file and made sure that the RouteServiceProvider is included in the providers for the app i opened RouteServiceProvider and the $namespace = 'App\Http\Controllers' but still when i type php artisan route:list i could not find them i am trying for a day now can any one help

this is my request file

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class master extends FormRequest
{

    Route::get('/home','mastercontroller@index');
    Route::get('/lina','mastercontroller@index');
    Route::get('/love','mastercontroller@index');
    /**
    * Determine if the user is authorized to make this request.
    *
    * @return bool
    */
    public function authorize()
    {
        return true;
    }
    /**
    * Get the validation rules that apply to the request.
    *
    * @return array
    */
    public function rules()
    {
        return [
            //
        ];
    }
}

and this is my controller file

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class mastercontroller extends Controller
{
    public function index()
    {
        return view('index');
    }
}

it should load the index view



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2S5qrmV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire