Table of Contents
This project is created to learn and practice livewire; understand why it is created; and explore the power of LIVEWIRE with WireUI.
This project consists of Livewire table with sorting, search, and perPage functionalities.
Also, Roles and Permissions have been added with Policies.
Support Dark Mode :
Left-to-Right Language Support : Right-to-Left Language Support :Follow these steps to try this out on your localhost.
- Clone the repo
git clone https://github.com/altwaireb/livewire-wireUi.git
- Run composer install
composer install
- Create .env
cp .env.example .env
- Generate key
php artisan key:generate
- Run npm install
npm install
- Run npm run dev
npm run dev
- Run migration files
php artisan migrate
- Run seeders
php artisan db:seed
- Run on your localhost
php artisan serve
To create Component inside admin
php artisan make:livewire admin.model.ModelIndex
You can use Trait to get all functionality for Sorting and Searching and Pagination.
use App\Traits\WithSorting;
class FooIndex extends Component
{
use WithSorting;
...
The default sort is the id you can change to another column e.g:
use App\Traits\WithSorting;
class FooIndex extends Component
{
use WithSorting;
public function mount()
{
$this->sortBy = 'name';
// same with sort Direction
$this->sortDirection = 'asc';
// same with Per Page
$this->perPage = 25;
}
...
Admin
username: [email protected]
password: password