aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Controllers/NewsController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Http/Controllers/NewsController.php')
-rw-r--r--app/Http/Controllers/NewsController.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php
index de7a823..8be535e 100644
--- a/app/Http/Controllers/NewsController.php
+++ b/app/Http/Controllers/NewsController.php
@@ -34,9 +34,8 @@ class NewsController extends Controller
*/
public function create()
{
- //
- $data = Post::orderBy('created_at', 'desc')->get();
- return view('pages.news-admin', compact('data'));
+ //$data = Post::orderBy('created_at', 'desc')->get();
+ return view('pages.news-admin');//, compact('data'));
}
/**
@@ -127,8 +126,8 @@ class NewsController extends Controller
$post->text = $request->text;
$post->saveOrFail();
- return Redirect::route('newsAdd')->with('statusE', "Post edited.");
- } else return Redirect::route('newsAdd');
+ return Redirect::route('news')->with('status', "Post edited.");
+ } else return Redirect::route('news');
}
/**
@@ -142,6 +141,6 @@ class NewsController extends Controller
$post = Post::findOrFail($id);
$title = $post->title;
$post->delete();
- return Redirect::back()->with('statusE', "Post \"$title\" deleted.");
+ return Redirect::back()->with('status', "Post \"$title\" deleted.");
}
}