aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-10-31 14:10:53 +0100
committerMateja <mail@matejamaric.com>2020-10-31 14:10:53 +0100
commit16eb120253efa86e7c5fa548e03de321a5b54a1b (patch)
tree4b29776eaac447a69e18c3f1b294ba54d3a60a6f /app
parentdc94a41f2073d193d04cc0a9cdb852950b2da048 (diff)
downloadyota-laravel-16eb120253efa86e7c5fa548e03de321a5b54a1b.tar.gz
yota-laravel-16eb120253efa86e7c5fa548e03de321a5b54a1b.zip
Little bit of sanitizing...
Diffstat (limited to 'app')
-rw-r--r--app/Http/Controllers/PagesController.php24
-rw-r--r--app/Http/Controllers/SpecialCallsController.php2
2 files changed, 4 insertions, 22 deletions
diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php
index c30f923..ebd6b13 100644
--- a/app/Http/Controllers/PagesController.php
+++ b/app/Http/Controllers/PagesController.php
@@ -20,8 +20,10 @@ class PagesController extends Controller
public function news(Request $request)
{
- $news = Post::all();
+ $news = Post::orderBy('created_at', 'desc')->get();
+ //$data = ['news' => $news];
+ //return view('pages.news')->with($data);
//return view('pages.news')->with('news', $news);
return view('pages.news', compact('news'));
}
@@ -79,24 +81,4 @@ class PagesController extends Controller
Auth::logout();
return Redirect::back();
}
-
- // NOTES
- //public function services()
- //{
- ////$title = 'Some title';
- ////return view('pages.index', compact('title'));
- //$data = [
- //'title' => 'Services',
- //'services' => ['Web design', 'Programming', 'SEO']
- //];
- //return view('pages.services')->with($data);
- //}
-
- //public function about()
- //{
- ////$title = 'About';
- ////return view('pages.index')->with('title', $title);
- //$data = ['title' => 'About'];
- //return view('pages.index')->with($data);
- //}
}
diff --git a/app/Http/Controllers/SpecialCallsController.php b/app/Http/Controllers/SpecialCallsController.php
index 3a3ab89..dcfbbf0 100644
--- a/app/Http/Controllers/SpecialCallsController.php
+++ b/app/Http/Controllers/SpecialCallsController.php
@@ -38,6 +38,6 @@ class SpecialCallsController extends Controller
'phone' => ['required', 'regex:/^[0-9 ]+$/'],
]);
- return redirect('reserve')->with('status', 'Reservation submitted.');
+ return redirect()->route('reserve')->with('status', 'Reservation submitted.');
}
}