QuickAdminPanel: Livewire+Tailwind Version
In April 2021, we released a separate QuickAdminPanel version that generates the code with Livewire and Tailwind, using the modern TALL stack.
Notice: this version is available only for the Yearly Plan customers.
Here are a few screenshots of a simple adminpanel, fully generated without writing a single line of code:
Login form page
Simple Datatable Example
Simple Form Example
For the design, we're using a theme Notus JS by Creative Tim.

Structure of Generated Code

We believe that Laravel Livewire is really powerful for dynamic elements on the pages, so every inner page in our adminpanel is a Livewire component that you can customize however you want.
So, the main project structure is good old Laravel with Routes and Blade, and inside of each resources/views/admin/xxxxx.blade.php you will find a line similar to this:
1
<div class="card-body">
2
@livewire('transaction.create')
3
</div>
Copied!
It means that there are three separate Livewire components for each CRUD:
  • Create Page;
  • Edit Page;
  • Index Page.
Typical code of Livewire component:
app/Http/Livewire/Transaction/Index.php
1
<?php
2
​
3
namespace App\Http\Livewire\Transaction;
4
​
5
use App\Http\Livewire\WithConfirmation;
6
use App\Http\Livewire\WithSorting;
7
use App\Models\Transaction;
8
use Illuminate\Http\Response;
9
use Illuminate\Support\Facades\Gate;
10
use Livewire\Component;
11
use Livewire\WithPagination;
12
​
13
class Index extends Component
14
{
15
use WithPagination;
16
use WithSorting;
17
use WithConfirmation;
18
​
19
public int $perPage;
20
​
21
public array $orderable;
22
​
23
public string $search = '';
24
​
25
public array $selected = [];
26
​
27
public array $paginationOptions;
28
​
29
protected $queryString = [
30
'search' => [
31
'except' => '',
32
],
33
'sortBy' => [
34
'except' => 'id',
35
],
36
'sortDirection' => [
37
'except' => 'desc',
38
],
39
];
40
​
41
public function getSelectedCountProperty()
42
{
43
return count($this->selected);
44
}
45
​
46
public function updatingSearch()
47
{
48
$this->resetPage();
49
}
50
​
51
public function updatingPerPage()
52
{
53
$this->resetPage();
54
}
55
​
56
public function resetSelected()
57
{
58
$this->selected = [];
59
}
60
​
61
public function mount()
62
{
63
$this->sortBy = 'id';
64
$this->sortDirection = 'desc';
65
$this->perPage = 100;
66
$this->paginationOptions = config('project.pagination.options');
67
$this->orderable = (new Transaction())->orderable;
68
}
69
​
70
public function render()
71
{
72
$query = Transaction::advancedFilter([
73
's' => $this->search ?: null,
74
'order_column' => $this->sortBy,
75
'order_direction' => $this->sortDirection,
76
]);
77
​
78
$transactions = $query->paginate($this->perPage);
79
​
80
return view('livewire.transaction.index', compact('query', 'transactions', 'transactions'));
81
}
82
​
83
public function deleteSelected()
84
{
85
abort_if(Gate::denies('transaction_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
86
​
87
Transaction::whereIn('id', $this->selected)->delete();
88
​
89
$this->resetSelected();
90
}
91
​
92
public function delete(Transaction $transaction)
93
{
94
abort_if(Gate::denies('transaction_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');
95
​
96
$transaction->delete();
97
}
98
}
Copied!
For Datatables, we don't use any external packages, as we believe it's not needed in this case - all the pagination/filtering/sorting could happen directly in the component, using the power of some reusable Traits.
For Roles/Permissions, we use the core Laravel Gate functionality, without any external packages. You can read more about it here.
You can look at the full code of this example adminpanel in this public repository.
​
Last modified 7mo ago