Skip to content

Commit

Permalink
ajout d'un layout + vue basique pour user
Browse files Browse the repository at this point in the history
  • Loading branch information
hyptos committed Apr 27, 2015
1 parent 7695b8f commit 93abfa3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion service/app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UserController extends Controller {
*/
public function showProfile($id)
{
return view('user.profile', ['user' => $id]);
return view('user', ['user' => $id]);
}

}
8 changes: 5 additions & 3 deletions service/app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
return 'hello world';
});

$app->get('{path:.*}', function($path)
{
echo 'You just visited my site dot com slash ' . $path;
$app->get('user', function(){
return 'user';
});

$app->get('user/{id}', function($id){
return 'user'+$id;
});

$app->get('user/{id}', 'App\Http\Controllers\UserController@showProfile');
10 changes: 10 additions & 0 deletions service/resources/views/layouts/master.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<title>App Name - @yield('title')</title>
</head>
<body>
<div class="container">
@yield('content')
</div>
</body>
</html>
13 changes: 13 additions & 0 deletions service/resources/views/user.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@extends('layouts.master')

@section('title', 'Page Title')

@section('sidebar')
@parent

<p>This is appended to the master sidebar.</p>
@stop

@section('content')
<p>{{$user}}</p>
@stop

0 comments on commit 93abfa3

Please sign in to comment.