we love Stisla Admin Template, Krlove and Laravel 8 let's make them love each other.
- Laravel ^8.5 - laravel.com/docs/8.x
- Laravel Jetstream ^1.2 - jetstream.laravel.com
- Livewire ^2.0 - laravel-livewire.com
- Stisla Admin Template ^2.3.0 - getstisla.com
- Krlove/eloquent-model-generator": ^1.3" - krlove/eloquent-model-generator
- Adjustment jetstream (with prefix and name admin for dashboard)
- Form component for CRUD with Livewire
Include simple Data Table with Livewire (CRUD).
After clone or download this repository, next step is install all dependency required by laravel and laravel-mix.
# install composer-dependency
$ composer install
# install npm package
$ npm install
# build dev
$ npm run dev
Before we start web server make sure we already generate app key, configure .env
file and do migration.
# create copy of .env
$ cp .env.example .env
# create laravel key
$ php artisan key:generate
# laravel migrate
$ php artisan migrate
- make form component with livewire
# create copy of .env
$ php artisan make:livewire form-name
- use component you create to view
example on resource -> view -> pages -> content -> create
- use component what you needed
# if you need input like text, number, email, etc
<x-input type="text" title="Title" model="content.title"/>
# if you need summernote or textarea for longtext
<x-summernote title="Contents" model="content.content"/>
<x-textarea title="Contents" model="content.contents"/>
# if you need option like select or checkbox
<x-select :options="$optionStatus" :selected="$content['status_id']" title="Status" model="content.status_id"/>
<x-select2 :options="$optionTags" :selected="$contentTags" title="Tag content" model="contentTags"/>
#if you need date input
<x-date type="datepicker" title="Time publish" model="content.created_at"/>
<x-date type="datetimepicker" title="Time publish" model="content.created_at"/>
<x-time title="Time publish" model="content.created_at"/>
<x-daterange title="Time publish" model="content.created_at"/>
#if you need input file
<x-input type="file" title="Thumbnail" model="thumbnail" accept="image/*"/>
<div wire:loading wire:target="thumbnail">
Proses upload
</div>
- use livewire controller (component)
example on app -> Http -> Livewire -> FormContent.php