I get this error. UnexpectedValueException Invalid route action: [App \ Http \ Controllers \ AspiranteController]

0
Route::get('aspirante','AspiranteController');



<?php
  namespace App\Http\Controllers;
  use Illuminate\Http\Request;
  use Illuminate\Contracts\Validation\Validator;

  class AspiranteController extends Controller
  {
    public function index()
    {
      return view('aspirante.index');
    }

    public function create()
    {
      return view('aspirante.create');
    }
  }
    
asked by Santiago L Morales 29.11.2018 в 17:48
source

1 answer

0

Your route is not calling a controller of type Resource so you must specify which method you want to call on your route, in this way

Route::get('aspirante','AspiranteController@index’);

In this way the route knows that in /aspirante must access the logic of the method index and so for each one

    
answered by 29.11.2018 в 18:07