Example #1
0
 public function run()
 {
     DB::table('content_areas')->delete();
     ContentArea::create(['name' => 'Header', 'alias' => 'header', 'description' => 'The header content area.', 'display_order' => 1, 'created_by' => 1, 'modified_by' => 1]);
     ContentArea::create(['name' => 'Footer', 'alias' => 'footer', 'description' => 'The footer content area.', 'display_order' => 3, 'created_by' => 1, 'modified_by' => 1]);
     ContentArea::create(['name' => 'Main', 'alias' => 'main', 'description' => 'The main content area.', 'display_order' => 2, 'created_by' => 1, 'modified_by' => 1]);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $content_areas = ContentArea::lists('name', 'id');
     $pages = Page::lists('name', 'id');
     $article = Article::findOrFail($id);
     return view('articles.edit', compact('article', 'pages', 'content_areas'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $destroyContentArea = ContentArea::destroy($id);
     flash()->success('Content Area Deleted.');
     return redirect('contentarea');
 }
Example #4
-2
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $pagesAll = Page::all();
     $articlesAll = Article::all();
     $templatesAll = Template::all();
     $contentAreasAll = ContentArea::all();
     $content_areas = ContentArea::lists('name', 'id');
     $pages = Page::lists('name', 'id');
     $article = Article::findOrFail($id);
     return view('site.edit', compact('article', 'pages', 'content_areas', 'pagesAll', 'articlesAll', 'templatesAll', 'contentAreasAll'));
 }