diff options
Diffstat (limited to 'app/Http/Controllers')
-rw-r--r-- | app/Http/Controllers/PagesController.php | 6 |
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) |