nurzzzone / admin-panel
Admin panel
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: >=7.3.0
- laravel/framework: >=5.5
Requires (Dev)
- fzaninotto/faker: ~1.4
- laravel/laravel: >=5.5
This package is auto-updated.
Last update: 2024-10-12 16:51:53 UTC
README
Installation
composer require nurzzzone/admin-panel
After package installation run this command to add assets(javascript/css) into public directory
php artisan vendor:publish admin-panel-assets
Basic Usage
\Nurzzzone\AdminPanel\Support\Table
component renders rows from database as table
class PostController extends \Nurzzzone\AdminPanel\Controllers\TableController { public function fromTable() { $table = new \Nurzzzone\AdminPanel\Support\Table(Post::query()); $table->enablePagination(); $table->addColumn(new \Nurzzzone\AdminPanel\Support\Table\Text('ID', 'id')); $table->addColumn(new \Nurzzzone\AdminPanel\Support\Table\Text('Title', 'title')); return $table; } }
If you want to add your custom views using admin-panel layout you need to add this into the top of the blade file:
@extends('admin-panel::layouts.base') @section('title', 'Blog Posts') // page title @section('css') // styles @endsection() @section('content') // html content @endsection() @section('scripts') // js @endsection()