Commit 83431b90 authored by Vipul Basapati's avatar Vipul Basapati

removed generator resources/vendor files

parent 76ef47c9
<?php
namespace AttributeNamespace;
/**
* Class AttributeClass.
*/
trait AttributeClass
{
// Make your attributes functions here
// Further, see the documentation : https://laravel.com/docs/5.4/eloquent-mutators#defining-an-accessor
/**
* Action Button Attribute to show in grid
* @return string
*/
public function getActionButtonsAttribute()
{
return '<div class="btn-group action-btn">
'.$this->getEditButtonAttribute("editPermission", "editRoute").'
'.$this->getDeleteButtonAttribute("deletePermission", "deleteRoute").'
</div>';
}
}
<?php
Breadcrumbs::register('admin.dummy_small_plural_model.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.dummy_small_plural_model.management'), route('admin.dummy_small_plural_model.index'));
});
Breadcrumbs::register('admin.dummy_small_plural_model.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dummy_small_plural_model.index');
$breadcrumbs->push(trans('menus.backend.dummy_small_plural_model.create'), route('admin.dummy_small_plural_model.create'));
});
Breadcrumbs::register('admin.dummy_small_plural_model.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.dummy_small_plural_model.index');
$breadcrumbs->push(trans('menus.backend.dummy_small_plural_model.edit'), route('admin.dummy_small_plural_model.edit', $id));
});
<?php
namespace DummyNamespace;
use DummyModelNamespace;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DummyRepositoryNamespace;
use DummyManageRequestNamespace;
@Namespaces
/**
* DummyController
*/
class DummyController extends Controller
{
/**
* variable to store the repository object
* @var dummy_repository
*/
protected $repository;
/**
* contructor to initialize repository object
* @param dummy_repository $repository;
*/
public function __construct(dummy_repository $repository)
{
$this->repository = $repository;
}
/**
* Display a listing of the resource.
*
* @param DummyManageRequestNamespace $request
* @return \Illuminate\Http\Response
*/
public function index(DummyManageRequest $request)
{
return view('backend.dummy_small_plural_model.index');
}
@startCreate/**
* Show the form for creating a new resource.
*
* @param DummyCreateRequestNamespace $request
* @return \Illuminate\Http\Response
*/
public function create(DummyCreateRequest $request)
{
return view('backend.dummy_small_plural_model.create');
}
/**
* Store a newly created resource in storage.
*
* @param DummyStoreRequestNamespace $request
* @return \Illuminate\Http\Response
*/
public function store(DummyStoreRequest $request)
{
//Input received from the request
$input = $request->except(['_token']);
//Create the model using repository create method
$this->repository->create($input);
//return with successfull message
return redirect()->route('admin.dummy_small_plural_model.index')->withFlashSuccess(trans('alerts.backend.dummy_small_plural_model.created'));
}
@endCreate@startEdit/**
* Show the form for editing the specified resource.
*
* @param DummyModelNamespace $DummyArgumentName
* @param DummyEditRequestNamespace $request
* @return \Illuminate\Http\Response
*/
public function edit(DummyModel $DummyArgumentName, DummyEditRequest $request)
{
return view('backend.dummy_small_plural_model.edit', compact('DummyArgumentName'));
}
/**
* Update the specified resource in storage.
*
* @param DummyUpdateRequestNamespace $request
* @param DummyModelNamespace $DummyArgumentName
* @return \Illuminate\Http\Response
*/
public function update(DummyUpdateRequest $request, DummyModel $DummyArgumentName)
{
//Input received from the request
$input = $request->except(['_token']);
//Update the model using repository update method
$this->repository->update( $DummyArgumentName, $input );
//return with successfull message
return redirect()->route('admin.dummy_small_plural_model.index')->withFlashSuccess(trans('alerts.backend.dummy_small_plural_model.updated'));
}
@endEdit@startDelete/**
* Remove the specified resource from storage.
*
* @param DummyDeleteRequestNamespace $request
* @param DummyModelNamespace $DummyArgumentName
* @return \Illuminate\Http\Response
*/
public function destroy(DummyModel $DummyArgumentName, DummyDeleteRequest $request)
{
//Calling the delete method on repository
$this->repository->delete($DummyArgumentName);
//returning with successfull message
return redirect()->route('admin.dummy_small_plural_model.index')->withFlashSuccess(trans('alerts.backend.dummy_small_plural_model.deleted'));
}
@endDelete
}
<?php
namespace DummyNamespace;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use DummyAttribute;
use DummyRelationship;
class DummyModel extends Model
{
use ModelTrait,
AttributeName,
RelationshipName {
// AttributeName::getEditButtonAttribute insteadof ModelTrait;
}
/**
* NOTE : If you want to implement Soft Deletes in this model,
* then follow the steps here : https://laravel.com/docs/5.4/eloquent#soft-deleting
*/
/**
* The database table used by the model.
* @var string
*/
protected $table = 'table_name';
/**
* Mass Assignable fields of model
* @var array
*/
protected $fillable = [
];
/**
* Default values for model fields
* @var array
*/
protected $attributes = [
];
/**
* Dates
* @var array
*/
protected $dates = [
'created_at',
'updated_at'
];
/**
* Guarded fields of model
* @var array
*/
protected $guarded = [
'id'
];
/**
* Constructor of Model
* @param array $attributes
*/
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
}
}
<?php
namespace RelationshipNamespace;
/**
* Class RelationshipClass
*/
trait RelationshipClass
{
/*
* put you model relationships here
* Take below example for reference
*/
/*
public function users() {
//Note that the below will only work if user is represented as user_id in your table
//otherwise you have to provide the column name as a parameter
//see the documentation here : https://laravel.com/docs/5.4/eloquent-relationships
$this->belongsTo(User::class);
}
*/
}
<?php
namespace DummyNamespace;
use DB;
use Carbon\Carbon;
use DummyModelNamespace;
use App\Exceptions\GeneralException;
use App\Repositories\BaseRepository;
use Illuminate\Database\Eloquent\Model;
/**
* Class DummyRepoName.
*/
class DummyRepoName extends BaseRepository
{
/**
* Associated Repository Model.
*/
const MODEL = dummy_model_name::class;
/**
* This method is used by Table Controller
* For getting the table data to show in
* the grid
* @return mixed
*/
public function getForDataTable()
{
return $this->query()
->select([
config('module.model_small_plural.table').'.id',
config('module.model_small_plural.table').'.created_at',
config('module.model_small_plural.table').'.updated_at',
]);
}
@startCreate
/**
* For Creating the respective model in storage
*
* @param array $input
* @throws GeneralException
* @return bool
*/
public function create(array $input)
{
$dummy_small_model_name = self::MODEL;
$dummy_small_model_name = new $dummy_small_model_name();
if ($dummy_small_model_name->save($input)) {
return true;
}
throw new GeneralException(trans('exceptions.backend.dummy_small_plural_model_name.create_error'));
}
@endCreate@startEdit
/**
* For updating the respective Model in storage
*
* @param dummy_model_name $dummy_small_model_name
* @param $input
* @throws GeneralException
* return bool
*/
public function update(dummy_model_name $dummy_small_model_name, array $input)
{
if ($dummy_small_model_name->update($input))
return true;
throw new GeneralException(trans('exceptions.backend.dummy_small_plural_model_name.update_error'));
}
@endEdit@startDelete
/**
* For deleting the respective model from storage
*
* @param dummy_model_name $dummy_small_model_name
* @throws GeneralException
* @return bool
*/
public function delete(dummy_model_name $dummy_small_model_name)
{
if ($dummy_small_model_name->delete()) {
return true;
}
throw new GeneralException(trans('exceptions.backend.dummy_small_plural_model_name.delete_error'));
}@endDelete
}
<?php
namespace DummyNamespace;
use Illuminate\Foundation\Http\FormRequest;
class DummyClass extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return access()->allow('permission');
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//Put your rules for the request in here
//For Example : 'title' => 'required'
//Further, see the documentation : https://laravel.com/docs/5.4/validation#creating-form-requests
];
}
public function messages()
{
return [
//The Custom messages would go in here
//For Example : 'title.required' => 'You need to fill in the title field.'
//Further, see the documentation : https://laravel.com/docs/5.4/validation#customizing-the-error-messages
];
}
}
<?php
namespace DummyNamespace;
use Carbon\Carbon;
use App\Http\Controllers\Controller;
use Yajra\DataTables\Facades\DataTables;
use DummyRepositoryNamespace;
use DummyManageRequestNamespace;
/**
* Class DummyTableController.
*/
class DummyTableController extends Controller
{
/**
* variable to store the repository object
* @var dummy_repository
*/
protected $dummy_small_repo_name;
/**
* contructor to initialize repository object
* @param dummy_repository $dummy_small_repo_name;
*/
public function __construct(dummy_repository $dummy_small_repo_name)
{
$this->dummy_small_repo_name = $dummy_small_repo_name;
}
/**
* This method return the data of the model
* @param dummy_manage_request_name $request
*
* @return mixed
*/
public function __invoke(dummy_manage_request_name $request)
{
return Datatables::of($this->dummy_small_repo_name->getForDataTable())
->escapeColumns(['id'])
->addColumn('created_at', function ($dummy_small_repo_name) {
return Carbon::parse($dummy_small_repo_name->created_at)->toDateString();
})
->addColumn('actions', function ($dummy_small_repo_name) {
return $dummy_small_repo_name->action_buttons;
})
->make(true);
}
}
@extends ('backend.layouts.app')
@section ('title', trans('labels.backend.dummy_small_plural_model.management') . ' | ' . trans('labels.backend.dummy_small_plural_model.create'))
@section('page-header')
<h1>
{{ trans('labels.backend.dummy_small_plural_model.management') }}
<small>{{ trans('labels.backend.dummy_small_plural_model.create') }}</small>
</h1>
@endsection
@section('content')
{{ Form::open(['route' => 'admin.dummy_small_plural_model.store', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'id' => 'create-dummy_small_model']) }}
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.create') }}</h3>
<div class="box-tools pull-right">
@include('backend.dummy_small_plural_model.partials.dummy_small_plural_model-header-buttons')
</div><!--box-tools pull-right-->
</div><!--box-header with-border-->
<div class="box-body">
<div class="form-group">
{{-- Including Form blade file --}}
@include("backend.dummy_small_plural_model.form")
<div class="edit-form-btn">
{{ link_to_route('admin.dummy_small_plural_model.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.create'), ['class' => 'btn btn-primary btn-md']) }}
<div class="clearfix"></div>
</div><!--edit-form-btn-->
</div><!-- form-group -->
</div><!--box-body-->
</div><!--box box-success-->
{{ Form::close() }}
@endsection
@extends ('backend.layouts.app')
@section ('title', trans('labels.backend.dummy_small_plural_model.management') . ' | ' . trans('labels.backend.dummy_small_plural_model.edit'))
@section('page-header')
<h1>
{{ trans('labels.backend.dummy_small_plural_model.management') }}
<small>{{ trans('labels.backend.dummy_small_plural_model.edit') }}</small>
</h1>
@endsection
@section('content')
{{ Form::model($dummy_small_model, ['route' => ['admin.dummy_small_plural_model.update', $dummy_small_model], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-dummy_small_model']) }}
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.edit') }}</h3>
<div class="box-tools pull-right">
@include('backend.dummy_small_plural_model.partials.dummy_small_plural_model-header-buttons')
</div><!--box-tools pull-right-->
</div><!--box-header with-border-->
<div class="box-body">
<div class="form-group">
{{-- Including Form blade file --}}
@include("backend.dummy_small_plural_model.form")
<div class="edit-form-btn">
{{ link_to_route('admin.dummy_small_plural_model.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.update'), ['class' => 'btn btn-primary btn-md']) }}
<div class="clearfix"></div>
</div><!--edit-form-btn-->
</div><!--form-group-->
</div><!--box-body-->
</div><!--box box-success -->
{{ Form::close() }}
@endsection
<div class="box-body">
<div class="form-group">
<!-- Create Your Field Label Here -->
<!-- Look Below Example for reference -->
{{-- {{ Form::label('name', trans('labels.backend.blogs.title'), ['class' => 'col-lg-2 control-label required']) }} --}}
<div class="col-lg-10">
<!-- Create Your Input Field Here -->
<!-- Look Below Example for reference -->
{{-- {{ Form::text('name', null, ['class' => 'form-control box-size', 'placeholder' => trans('labels.backend.blogs.title'), 'required' => 'required']) }} --}}
</div><!--col-lg-10-->
</div><!--form-group-->
</div><!--box-body-->
@section("after-scripts")
<script type="text/javascript">
//Put your javascript needs in here.
//Don't forget to put `@`parent exactly after `@`section("after-scripts"),
//if your create or edit blade contains javascript of its own
$( document ).ready( function() {
//Everything in here would execute after the DOM is ready to manipulated.
});
</script>
@endsection
<!--Action Button-->
@if( Active::checkUriPattern( 'admin/dummy_small_plural_model' ) )
<div class="btn-group">
<button type="button" class="btn btn-warning btn-flat dropdown-toggle" data-toggle="dropdown">Export
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li id="copyButton"><a href="#"><i class="fa fa-clone"></i> Copy</a></li>
<li id="csvButton"><a href="#"><i class="fa fa-file-text-o"></i> CSV</a></li>
<li id="excelButton"><a href="#"><i class="fa fa-file-excel-o"></i> Excel</a></li>
<li id="pdfButton"><a href="#"><i class="fa fa-file-pdf-o"></i> PDF</a></li>
<li id="printButton"><a href="#"><i class="fa fa-print"></i> Print</a></li>
</ul>
</div>
@endif
<!--Action Button-->
<div class="btn-group">
<button type="button" class="btn btn-primary btn-flat dropdown-toggle" data-toggle="dropdown">Action
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li>
<a href="{{ route( 'admin.dummy_small_plural_model.index' ) }}">
<i class="fa fa-list-ul"></i> {{ trans( 'menus.backend.dummy_small_plural_model.all' ) }}
</a>
</li>
@create@permission( 'create-dummy_small_model' )
<li>
<a href="{{ route( 'admin.dummy_small_plural_model.create' ) }}">
<i class="fa fa-plus"></i> {{ trans( 'menus.backend.dummy_small_plural_model.create' ) }}
</a>
</li>
@endauth@endCreate
</ul>
</div>
<div class="clearfix"></div>
@extends ('backend.layouts.app')
@section ('title', trans('labels.backend.dummy_small_plural_model.management'))
@section('page-header')
<h1>{{ trans('labels.backend.dummy_small_plural_model.management') }}</h1>
@endsection
@section('content')
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.management') }}</h3>
<div class="box-tools pull-right">
@include('backend.dummy_small_plural_model.partials.dummy_small_plural_model-header-buttons')
</div>
</div><!--box-header with-border-->
<div class="box-body">
<div class="table-responsive data-table-wrapper">
<table id="dummy_small_plural_model-table" class="table table-condensed table-hover table-bordered">
<thead>
<tr>
<th>{{ trans('labels.backend.dummy_small_plural_model.table.id') }}</th>
<th>{{ trans('labels.backend.dummy_small_plural_model.table.createdat') }}</th>
<th>{{ trans('labels.general.actions') }}</th>
</tr>
</thead>
<thead class="transparent-bg">
<tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
</table>
</div><!--table-responsive-->
</div><!-- /.box-body -->
</div><!--box-->
@endsection
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
//Below written line is short form of writing $(document).ready(function() { })
$(function() {
var dataTable = $('#dummy_small_plural_model-table').dataTable({
processing: true,
serverSide: true,
ajax: {
url: '{{ route("admin.dummy_small_plural_model.get") }}',
type: 'post'
},
columns: [
{data: 'id', name: '{{config('module.dummy_small_plural_model.table')}}.id'},
{data: 'created_at', name: '{{config('module.dummy_small_plural_model.table')}}.created_at'},
{data: 'actions', name: 'actions', searchable: false, sortable: false}
],
order: [[0, "asc"]],
searchDelay: 500,
dom: 'lBfrtip',
buttons: {
buttons: [
{ extend: 'copy', className: 'copyButton', exportOptions: {columns: [ 0, 1 ] }},
{ extend: 'csv', className: 'csvButton', exportOptions: {columns: [ 0, 1 ] }},
{ extend: 'excel', className: 'excelButton', exportOptions: {columns: [ 0, 1 ] }},
{ extend: 'pdf', className: 'pdfButton', exportOptions: {columns: [ 0, 1 ] }},
{ extend: 'print', className: 'printButton', exportOptions: {columns: [ 0, 1 ] }}
]
}
});
FinBuilders.DataTableSearch.init(dataTable);
});
</script>
@endsection
<?php
/**
* DummyModuleName
*
*/
Route::group(['namespace' => 'route_namespace', 'prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'admin'], function () {
@startNamespace
Route::group( ['namespace' => 'DummyModel'], function () {
Route::resource('dummy_name', 'DummyController');
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
});
@endNamespace@startWithoutNamespace
Route::resource('dummy_name', 'DummyController');
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
@endWithoutNamespace
});
\ No newline at end of file
<?php
/**
* Routes for : DummyModuleName
*/
Route::group(['namespace' => 'route_namespace', 'prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'admin'], function () {
@startNamespace
Route::group( ['namespace' => 'DummyModel'], function () {
Route::get('dummy_name', 'DummyController@index')->name('dummy_name.index');
@startCreateRoute::get('dummy_name/create', 'DummyController@create')->name('dummy_name.create');
Route::post('dummy_name', 'DummyController@store')->name('dummy_name.store');@endCreate
@startEditRoute::get('dummy_name/{dummy_argument_name}/edit', 'DummyController@edit')->name('dummy_name.edit');
Route::patch('dummy_name/{dummy_argument_name}', 'DummyController@update')->name('dummy_name.update');@endEdit
@startDeleteRoute::delete('dummy_name/{dummy_argument_name}', 'DummyController@destroy')->name('dummy_name.destroy');@endDelete
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
});
@endNamespace@startWithoutNamespace
Route::get('dummy_name', 'DummyController@index')->name('dummy_name.index');
@startCreateRoute::get('dummy_name/create', 'DummyController@create')->name('dummy_name.create');
Route::post('dummy_name', 'DummyController@store')->name('dummy_name.store');@endCreate
@startEditRoute::get('dummy_name/{dummy_argument_name}/edit', 'DummyController@edit')->name('dummy_name.edit');
Route::patch('dummy_name/{dummy_argument_name}', 'DummyController@update')->name('dummy_name.update');@endEdit
@startDeleteRoute::delete('dummy_name/{dummy_argument_name}', 'DummyController@destroy')->name('dummy_name.destroy');@endDelete
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
@endWithoutNamespace
});
\ No newline at end of file
@extends ('backend.layouts.app')
@section ('title', trans('generator::labels.modules.management') . ' | ' . trans('generator::labels.modules.create'))
@section('page-header')
<h1>
{{ trans('generator::labels.modules.management') }}
<small>{{ trans('generator::labels.modules.create') }}</small>
</h1>
@endsection
@section('content')
{{ Form::open(['route' => 'admin.modules.store', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'id' => 'create-module', 'files' => true]) }}
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('generator::labels.modules.create') }}</h3>
<div class="box-tools pull-right">
@include('generator::partials.modules-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
{{-- Including Form blade file --}}
<div class="box-body">
<div class="form-group">
@include("generator::form")
<div class="edit-form-btn">
{{ link_to_route('admin.modules.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.create'), ['class' => 'btn btn-primary btn-md']) }}
<div class="clearfix"></div>
</div>
</div>
</div><!--box-->
</div>
{{ Form::close() }}
@endsection
@extends ('backend.layouts.app')
@section ('title', trans('generator::labels.modules.management') . ' | ' . trans('generator::labels.modules.edit'))
@section('page-header')
<h1>
{{ trans('generator::labels.modules.management') }}
<small>{{ trans('generator::labels.modules.edit') }}</small>
</h1>
@endsection
@section('content')
{{ Form::model($module, ['route' => ['admin.modules.update', $module], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-module', 'files' => true]) }}
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('generator::labels.modules.edit') }}</h3>
<div class="box-tools pull-right">
@include('generator::partials.modules-header-buttons')
</div><!--box-tools pull-right-->
</div><!-- /.box-header -->
{{-- Including Form blade file --}}
<div class="box-body">
<div class="form-group">
@include("backend.modules.form")
<div class="edit-form-btn">
{{ link_to_route('admin.modules.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.update'), ['class' => 'btn btn-primary btn-md']) }}
<div class="clearfix"></div>
</div>
</div>
</div><!--box-->
</div>
{{ Form::close() }}
@endsection
\ No newline at end of file
This diff is collapsed.
@extends ('backend.layouts.app')
@section ('title', trans('labels.backend.modules.management'))
@section('page-header')
<h1>{{ trans('labels.backend.modules.management') }}</h1>
@endsection
@section('content')
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.modules.management') }}</h3>
<div class="box-tools pull-right">
@include('generator::partials.modules-header-buttons')
</div>
</div><!-- /.box-header -->
<div class="box-body">
<div class="table-responsive data-table-wrapper">
<table id="modules-table" class="table table-condensed table-hover table-bordered">
<thead>
<tr>
<th>{{ trans('labels.backend.modules.table.name') }}</th>
<th>{{ trans('labels.backend.modules.table.view_permission_id') }}</th>
<th>{{ trans('labels.backend.modules.table.url') }}</th>
<th>{{ trans('labels.backend.modules.table.created_by') }}</th>
</tr>
</thead>
<thead class="transparent-bg">
<tr>
<th>
{!! Form::text('name', null, ["class" => "search-input-text form-control", "data-column" => 0, "placeholder" => trans('labels.backend.modules.table.name')]) !!}
<a class="reset-data" href="javascript:void(0)"><i class="fa fa-times"></i></a>
</th>
<th>
{!! Form::text('permission', null, ["class" => "search-input-text form-control", "data-column" => 1, "placeholder" => trans('labels.backend.modules.table.view_permission_id')]) !!}
<a class="reset-data" href="javascript:void(0)"><i class="fa fa-times"></i></a>
</th>
<th>
{!! Form::text('route', null, ["class" => "search-input-text form-control", "data-column" => 2, "placeholder" => trans('labels.backend.modules.table.url')]) !!}
<a class="reset-data" href="javascript:void(0)"><i class="fa fa-times"></i></a>
</th>
<th>
{!! Form::text('created_by', null, ["class" => "search-input-text form-control", "data-column" => 3, "placeholder" => trans('labels.backend.modules.table.created_by')]) !!}
<a class="reset-data" href="javascript:void(0)"><i class="fa fa-times"></i></a>
</th>
</tr>
</thead>
</table>
</div><!--table-responsive-->
</div><!-- /.box-body -->
</div><!--box-->
<!--<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('history.backend.recent_history') }}</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div><!-- /.box tools -->
</div><!-- /.box-header -->
<div class="box-body">
{{-- {!! history()->renderType('Blog') !!} --}}
</div><!-- /.box-body -->
</div><!--box box-success-->
@endsection
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#modules-table').dataTable({
processing: true,
serverSide: true,
ajax: {
url: '{{ route("admin.modules.get") }}',
type: 'post'
},
columns: [
{data: 'name', name: '{{config('module.table')}}.name'},
{data: 'view_permission_id', name: '{{config('module.table')}}.view_permission_id'},
{data: 'url', name: '{{config('module.table')}}.url'},
{data: 'created_by', name: '{{config('access.users_table')}}.first_name'}
],
order: [[0, "asc"]],
searchDelay: 500,
dom: 'lBfrtip',
buttons: {
buttons: [
{ extend: 'copy', className: 'copyButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }},
{ extend: 'csv', className: 'csvButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }},
{ extend: 'excel', className: 'excelButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }},
{ extend: 'pdf', className: 'pdfButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }},
{ extend: 'print', className: 'printButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }}
]
}
});
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
<!--Action Button-->
@if(Active::checkUriPattern('admin/modules'))
<div class="btn-group">
<button type="button" class="btn btn-warning btn-flat dropdown-toggle" data-toggle="dropdown">Export
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li id="copyButton"><a href="#"><i class="fa fa-clone"></i> Copy</a></li>
<li id="csvButton"><a href="#"><i class="fa fa-file-text-o"></i> CSV</a></li>
<li id="excelButton"><a href="#"><i class="fa fa-file-excel-o"></i> Excel</a></li>
<li id="pdfButton"><a href="#"><i class="fa fa-file-pdf-o"></i> PDF</a></li>
<li id="printButton"><a href="#"><i class="fa fa-print"></i> Print</a></li>
</ul>
</div>
@endif
<!--Action Button-->
<div class="btn-group">
<button type="button" class="btn btn-primary btn-flat dropdown-toggle" data-toggle="dropdown">Action
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{route('admin.modules.index')}}"><i class="fa fa-list-ul"></i> {{trans('menus.backend.modules.all')}}</a></li>
<li><a href="{{route('admin.modules.create')}}"><i class="fa fa-plus"></i> {{trans('menus.backend.modules.create')}}</a></li>
</ul>
</div>
<div class="clearfix"></div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment