PagesController.php
817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use View;
class PagesController extends Controller
{
public function index()
{
if (View::exists('pages.index'))
return view('pages.index')
->with('text', '<b>Laravel</b>')
->with('name', 'Nicole');
# return view('pages.index', ['text' => '<b>Laravel</b>', 'name' => 'Nicole']);
else
return 'No view available';
}
public function profile()
{
return view('pages.profile');
}
public function settings()
{
return view('pages.settings');
}
public function blade()
{
$gender = 'femffffale';
$text = 'Hello there!';
return view('blade.bladetest', compact('gender', 'text'));
}
}