rename 'enabled' to 'active'
This commit is contained in:
parent
3678363766
commit
0cb98f1920
@ -20,7 +20,7 @@ class Airlines extends Model
|
||||
public $fillable = [
|
||||
'code',
|
||||
'name',
|
||||
'enabled'
|
||||
'active'
|
||||
];
|
||||
|
||||
/**
|
||||
@ -31,7 +31,7 @@ class Airlines extends Model
|
||||
protected $casts = [
|
||||
'code' => 'string',
|
||||
'name' => 'string',
|
||||
'enabled' => 'boolean'
|
||||
'active' => 'boolean'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ class CreateAirlinesTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->string('code');
|
||||
$table->string('name');
|
||||
$table->boolean('enabled');
|
||||
$table->boolean('active');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
@extends('layouts.admin.app')
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
|
@ -10,12 +10,12 @@
|
||||
{!! Form::text('name', null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
|
||||
<!-- Enabled Field -->
|
||||
<!-- Active Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('enabled', 'Enabled:') !!}
|
||||
{!! Form::label('active', 'Active:') !!}
|
||||
<label class="checkbox-inline">
|
||||
{!! Form::hidden('enabled', false) !!}
|
||||
{!! Form::checkbox('enabled', 'True', null) !!} 1
|
||||
{!! Form::hidden('active', false) !!}
|
||||
{!! Form::checkbox('active', 'True', null) !!} 1
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@extends('layouts.admin.app')
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
|
@ -1,4 +1,4 @@
|
||||
@extends('layouts.admin.app')
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
|
@ -16,10 +16,10 @@
|
||||
<p>{!! $airlines->name !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Enabled Field -->
|
||||
<!-- Active Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('enabled', 'Enabled:') !!}
|
||||
<p>{!! $airlines->enabled !!}</p>
|
||||
{!! Form::label('active', 'Active:') !!}
|
||||
<p>{!! $airlines->active !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Created At Field -->
|
||||
|
@ -2,20 +2,20 @@
|
||||
<thead>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Enabled</th>
|
||||
<th>Active?</th>
|
||||
<th colspan="3">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($airlines as $airlines)
|
||||
@foreach($airlines as $al)
|
||||
<tr>
|
||||
<td>{!! $airlines->code !!}</td>
|
||||
<td>{!! $airlines->name !!}</td>
|
||||
<td>{!! $airlines->enabled !!}</td>
|
||||
<td>{!! $al->code !!}</td>
|
||||
<td>{!! $al->name !!}</td>
|
||||
<td>{!! $al->active !!}</td>
|
||||
<td>
|
||||
{!! Form::open(['route' => ['airlines.destroy', $airlines->id], 'method' => 'delete']) !!}
|
||||
{!! Form::open(['route' => ['airlines.destroy', $al->id], 'method' => 'delete']) !!}
|
||||
<div class='btn-group'>
|
||||
<a href="{!! route('airlines.show', [$airlines->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
|
||||
<a href="{!! route('airlines.edit', [$airlines->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
|
||||
<a href="{!! route('airlines.show', [$al->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
|
||||
<a href="{!! route('airlines.edit', [$al->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{!! Form::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@ -23,4 +23,4 @@
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
<!-- Logo -->
|
||||
<a href="#" class="logo">
|
||||
<b>phpVMS<sup>nxt</sup></b>
|
||||
<b>phpvms<sup>next</sup></b>
|
||||
</a>
|
||||
|
||||
<!-- Header Navbar -->
|
||||
|
@ -19,11 +19,15 @@ Route::get('/', function () {
|
||||
Route::get('/home', 'HomeController@index');
|
||||
|
||||
|
||||
//Auth::routes();
|
||||
|
||||
/**
|
||||
* Admin routes
|
||||
*/
|
||||
|
||||
Route::get('/admin', function () {
|
||||
return redirect('/admin/airlines');
|
||||
});
|
||||
|
||||
Route::group([
|
||||
'namespace' => 'Admin',
|
||||
'middleware' => 'auth',
|
||||
@ -31,15 +35,6 @@ Route::group([
|
||||
], function () {
|
||||
Route::resource('airlines', 'AirlinesController');
|
||||
Route::resource('aircraft', 'AircraftController');
|
||||
|
||||
// Route::get('admin/aircrafts', ['as'=> 'admin.aircrafts.index', 'uses' => 'AircraftController@index']);
|
||||
// Route::post('admin/aircrafts', ['as'=> 'admin.aircrafts.store', 'uses' => 'AircraftController@store']);
|
||||
// Route::get('admin/aircrafts/create', ['as'=> 'admin.aircrafts.create', 'uses' => 'AircraftController@create']);
|
||||
// Route::put('admin/aircrafts/{aircrafts}', ['as'=> 'admin.aircrafts.update', 'uses' => 'AircraftController@update']);
|
||||
// Route::patch('admin/aircrafts/{aircrafts}', ['as'=> 'admin.aircrafts.update', 'uses' => 'AircraftController@update']);
|
||||
// Route::delete('admin/aircrafts/{aircrafts}', ['as'=> 'admin.aircrafts.destroy', 'uses' => 'AircraftController@destroy']);
|
||||
// Route::get('admin/aircrafts/{aircrafts}', ['as'=> 'admin.aircrafts.show', 'uses' => 'AircraftController@show']);
|
||||
// Route::get('admin/aircrafts/{aircrafts}/edit', ['as'=> 'admin.aircrafts.edit', 'uses' => 'AircraftController@edit']);
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user