apiato-bap-livewire is an Apiato container that brings Base Admin Panel based on LiveWire to Apiato Container instructure.
With Apiato Base Admin Panel with Livewire you will have a complete based admin panel for your Apiato project.
This project is only possible thanks to:
- Elshaden/apiato-livewire - https://github.com/Elshaden/apiato-livewire
- alighasemzadeh/bap - https://github.com/alighasemzadeh/bap
Laravel Livewire
Well, if you are familiar with Apiato, you would know that Apiato uses the DDD pattern, Domain Driven Design, this will make your code very well organized, easily maintainable, and most important, simple to have many developers work on the same application. While, the makers of Apiato, insist that it is mainly focused on API backend, I disagree, Apiato can handle both Web application as a frontend, and at the same time deliver flawless API backend.
Don't take my word for it.. Go on and give a test run...
#Usage
In Existing Apiato Application
composer require elshaden/apiato-livewire
Apiato Container Installer for more details
php artisan apiato:generate:container:livewire
- for Section enter Livewire or just enter, the system will create under the Livewire section regardless.
- for File name just click enter leave as is
- for the Container Enter the name of the Container, Not to be confused with the Component, this is just like any other Apiato Container
- the Component , that is your desired Livewire Component , you can use dots to define subfolders within the same Container
-
app
-
Containers
-
AppSection
-
Livewire
- Configs
- Providers
- UI
- WEB
- Routes
- Views
- <LivewireComponent1 / Or Livewire Component Dir1 >
- <LivewireComponent2 / Or Livewire Component Dir2 >
-
Vendor
-
...
-
Livewire
-
... `
public function render() {
return view('livewire@<ContainerName>::component');
}
The View Must Extend layouts.app
@extends('vendor@livewire::layouts.app')
In this view you must call the related Livewrie Component in the @section('content')
@section('content')
<div>
@livewire('<component name>')
</div>
@endsection
You can Create your own Blade Component and use them in the views you have to register all of them in the Main service provider in the container.
The same can be done with Livewire UI Modal, which is added by default
for more Details on Livewire UI Modal visit https://github.com/livewire-ui/modal