I searched a little on the internet, I found some topics that spoke about this, but none about my problem specifically.
So my error:
Action App\Http\Controllers\Users@index not defined.
The controller Users:
<?php
namespace App\Http\Controllers;
use Illuminate\Routing\UrlGenerator;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Input;
use App\Models\Users;
use Session;
use Validator;
class Users extends Controller {
protected $users;
public function __construct(Users $users)
{
$this->users = $users;
}
public function index()
{
$data['limit']=$limit;
$data['title']='Liste des Utilisateurs';
$data['result']=$this->user->user_list($limit);
return view('user_list', $data);
}
The routes:
Route::get('users/{limit?}', function($limit = 0, Request $request)
{
if(Auth::check()){
return redirect()->action('Users@index');
}else{
$request->session()->flash('message', 'Vous devez vous connecter avant de pouvoir accéder à la plateforme.');
return redirect('login');
}
});
Best regards
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2EoTQmy
via IFTTT
Aucun commentaire:
Enregistrer un commentaire