Reputation: 452
I just try to create a profile page i create a Route like this:
Route::get('profile/{id}/{name}','ProfileController@index');
and the index function like this :
public function index($id,$name)
{
$user = \App\User::find($id);
return view('pages.profile',compact('user'));
}
profile view:
@extends('app')
@section('content')
<div class="container" style="margin-top: 50px;padding: 30px;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="proPic"><img src="{{user->image}}" class="img-responsive" alt="Image"></div>
</div>
</div>
</div>
@endsection
but when I lunch the link i get a blank page
Upvotes: 0
Views: 173
Reputation: 817
If you have a default installation, you probably need to have:
@extends('layouts.app')
instead of
@extends('app')
and change
{{user->image}}
to
{{ $user->image }}
Upvotes: 3
Reputation: 43
Your code looks clean, a blank page can occur when laravel doesn't displays errors. I'd recommand you to : 1- Check the server response (HTTP code, content...) 2- Check your logs, maybe you'll discover a problem of configuration
Upvotes: 1