/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Page::find($id)->delete(); return redirect()->route('admin.page.index')->with('success', 'Successfully deleted!'); }
/** * Run the database seeds. * * @return void */ public function run() { Page::create(['title' => 'About us', 'user_id' => 1, 'slug' => 'about-us', 'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ducimus, vero, obcaecati, aut, error quam sapiente nemo saepe quibusdam sit excepturi nam quia corporis eligendi eos magni recusandae laborum minus inventore?', 'status' => 1]); }