Hello everybody, here is my index.blade.php file :
@extends ("layouts.main")
@section("content")
<div id="admin">
<h1>Categories Admin Panel</h1><hr>
<p>Here you can view, create delete categories</p>
<h2>Categories</h2><hr>
<ul>
@foreach ($categories as $category)
<li>{{$category->name}} - {{Form::open(array('url'=>'admin/categories/destroy','class'=>'form-inline'))}}
{{Form::hidden('id',$category->id)}}
{{Form::submit('delete')}}
{{Form::close()}}
</li>
@endforearch
</ul>
</div>
<h2>Create new category</h2><hr>
@if ($errors->has())
<div id="form-errors">
<p>The following errors have acured:</p>
<ul>
@foreach ($errors->all() as $error)
<li>{{$error}}</li>
@endforeach
</ul>
</div>
@endif
{{Form::open(array('url'=>'admin/categories/create'))}}
<p>
{{Form::label('name')}}
{{Form::text('name')}}
</p>
{{Form::submit('create category',array('class'=>'secondary-cart-btn'))}}
{{Form::close()}}
@stop
This code return an syntax error ! is there any error that cant cause that ? thx for your help
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community