For your controller I suppose you get all your projects like this
return View::make('')->with('projects', $projects); // Just as example
And in the view you should do
@foreach ( $projects as $project )
<a href="{{ route('project.show', $project->id) }}">{{ HTML::image($project->image) }}</a>
@endforeach
And in route you can do this
Route::get('project/{id}', array('as' => 'project.show', 'uses' => 'PortfolioController@show'));
For the show controller
public function show($id) {
$project = Project::find($id);
return View::make('')->with('project', $project);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community