Laravel 5.2
I have some problem with getting model id:
public function store(Request $request)
{
$this->validate($request, [
'title' => 'required|max:255',
'content' => 'required',
]);
$data = $request->all();
$page = new Page;
$page->create($data);
dd($page->id);
return redirect()->route('admin.pages.index');
}
$page->id return null...
what am I doing wrong?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire