Skip to content

Commit b40076e

Browse files
committed
Rename view stub from $resource->title to $resource->name
1 parent 470ee04 commit b40076e

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

resources/stubs/seed.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use {{rootNamespace}}Models\{{model}};
55

66
class {{class}} extends Seeder
77
{
8-
public function run()
8+
public function run(Faker\Generator $faker)
99
{
10-
$csvPath = database_path() . '/seeds/csv/' . '{{collection}}.csv';
10+
$csvPath = database_path() . DIRECTORY_SEPARATOR . 'seeds' . DIRECTORY_SEPARATOR . 'csv' . DIRECTORY_SEPARATOR . '{{collection}}.csv';
1111
$items = csv_to_array($csvPath);
1212

1313
foreach ($items as $key => $item)

resources/stubs/view.create_edit.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="box-header with-border">
88
<h3 class="box-title">
99
<span><i class="fa fa-edit"></i></span>
10-
<span>{{ isset($item)? 'Edit the ' . $item->title . ' entry': 'Create a new {{model}}' }}</span>
10+
<span>{{ isset($item)? 'Edit the ' . $item->name . ' entry': 'Create a new {{model}}' }}</span>
1111
</h3>
1212
</div>
1313

resources/stubs/view.index.stub

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,19 @@
2020
<table id="tbl-list" data-server="false" class="dt-table table table-striped table-bordered" cellspacing="0" width="100%">
2121
<thead>
2222
<tr>
23-
<th>Title</th>
23+
<th>{{model}}</th>
2424
<th class="desktop">Description</th>
25-
<th>Link</th>
26-
<th>Image</th>
2725
<th>Created</th>
2826
<th>Action</th>
2927
</tr>
3028
</thead>
3129
<tbody>
3230
@foreach ($items as $item)
3331
<tr>
34-
<td>{{ $item->title }}</td>
35-
<td>{!! $item->description !!}</td>
36-
<td>{{ link_to($item->action_link, $item->action_title, ['target' => '_blank']) }}</td>
37-
<td>{!! image_row_link($item->image) !!}</td>
38-
<td>{{ format_date($item->created_at) }}</td>
39-
<td>{!! action_row($selectedNavigation->url, $item->id, $item->title, ['show', 'edit', 'delete']) !!}</td>
32+
<td>{{ $item->name }}</td>
33+
<td>{!! $item->content !!}</td>
34+
<td>{{ $item->created_at->format('d M Y') }}</td>
35+
<td>{!! action_row($selectedNavigation->url, $item->id, $item->name, ['show', 'edit', 'delete']) !!}</td>
4036
</tr>
4137
@endforeach
4238
</tbody>

resources/stubs/view.show.stub

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="box-header with-border">
88
<h3 class="box-title">
99
<span><i class="fa fa-eye"></i></span>
10-
<span>{{collectionUpper}} - {{ $item->title }}</span>
10+
<span>{{collectionUpper}} - {{ $item->name }}</span>
1111
</h3>
1212
</div>
1313

@@ -20,8 +20,8 @@
2020
<div class="row">
2121
<section class="col col-6">
2222
<section class="form-group">
23-
<label>Title</label>
24-
<input type="text" class="form-control" value="{{ $item->title }}" readonly>
23+
<label>{{model}}</label>
24+
<input type="text" class="form-control" value="{{ $item->name }}" readonly>
2525
</section>
2626
</section>
2727

0 commit comments

Comments
 (0)