Category controller covered.

This commit is contained in:
James Cole
2014-12-20 16:53:32 +01:00
parent 1484621300
commit 7b4703e4ff
10 changed files with 152 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
@extends('layouts.default')
@section('content')
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
{{Form::open(['class' => 'form-horizontal','url' => route('categories.store')])}}
{{Form::open(['class' => 'form-horizontal','id' => 'store','url' => route('categories.store')])}}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">

View File

@@ -1,7 +1,7 @@
@extends('layouts.default')
@section('content')
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $category) }}
{{Form::open(['class' => 'form-horizontal','url' => route('categories.destroy',$category->id)])}}
{{Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('categories.destroy',$category->id)])}}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-red">

View File

@@ -1,7 +1,7 @@
@extends('layouts.default')
@section('content')
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $category) }}
{{Form::model($category, ['class' => 'form-horizontal','url' => route('categories.update',$category->id)])}}
{{Form::model($category, ['class' => 'form-horizontal','id' => 'update','url' => route('categories.update',$category->id)])}}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel panel-primary">

View File

@@ -31,7 +31,7 @@
@section('scripts')
<script type="text/javascript">
var componentID = {{$category->id}};
var year = {{Session::get('start')->format('Y')}};
var year = {{Session::get('start',\Carbon\Carbon::now()->startOfMonth())->format('Y')}};
</script>