Hello,
I have a view, called index.blade.php but i think it could be simplified.
@extends('layout')
@section('content')
<H1>This Is The object Page </H1>
@foreach($object as $object)
<div> <a href="/object/ {{ $object->obj_id }}">{{ $object->name }} </a>
@endforeach
@stop
i find things like {{ HTML::link_to_rout..... }} but when i use that i get error's i'm a total noob with Laravel, i do it like try and error. i'm trying tot build a web app.
You can also use this way using route:
In Route File:
Route::get('/object/{id}', ['as'=>'object','uses'=>'HomeController@object']);
In View File
<a href="{{ route('object',$object->obj_id) }}">{{ $object->name }} </a>
The easiest way to display link into blade is HTML::link
(Laravel HTML Helper), unfortunately Laravel HTML Helper has been disabled by default in Laravel 5. You can re activate it, read how to use it
After reactivate this, use it like:
{{ HTML::link('/object/$object->obj_id', $object->name, [], true)}}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community