aboutsummaryrefslogtreecommitdiff
path: root/app/Http
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-10-20 00:05:48 +0200
committerMateja <mail@matejamaric.com>2020-10-20 00:05:48 +0200
commitd78e06a328b1f06ae0bbe77a2d96cb304e23878d (patch)
tree17065caeda9221eb6ccc4795fcf0b08d673c18c7 /app/Http
parentdf3e709ea53fb9ea34224f3ad42d4f8dbbaf049d (diff)
downloadyota-laravel-d78e06a328b1f06ae0bbe77a2d96cb304e23878d.tar.gz
yota-laravel-d78e06a328b1f06ae0bbe77a2d96cb304e23878d.zip
Database, controller and news views.
Diffstat (limited to 'app/Http')
-rw-r--r--app/Http/Controllers/PagesController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php
index 086f2b9..c65e821 100644
--- a/app/Http/Controllers/PagesController.php
+++ b/app/Http/Controllers/PagesController.php
@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
+use App\Models\Post;
class PagesController extends Controller
{
@@ -20,7 +21,10 @@ class PagesController extends Controller
public function news(Request $request)
{
- return view('pages.news');
+ $news = Post::all();
+
+ //return view('pages.news')->with('news', $news);
+ return view('pages.news', compact('news'));
}
public function gallery(Request $request)