i created a UserController.php
use App\User;
//
class UsersController extends Controller
{
//
public function edit($id, User $user){
$user = $user->find($id);
return view('admin.user.edit' , compact('user'));
}
//
}
And edit views
but when i want to access to this url
url('/users/'. $user->id .'edit')
i got this error
Error edit() must be an instance of App\User, none given
!?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire