diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..d913a72 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,23 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[Bug]" +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Dev Environment** +PHP version: +Laravel Version: +Nodejs version: +NPM version: + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..f9acdb3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[Feature]" +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/issue.md b/.github/ISSUE_TEMPLATE/issue.md new file mode 100644 index 0000000..c07b387 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue.md @@ -0,0 +1,10 @@ +--- +name: Issue +about: Describe any issue regarding this package +title: "[Issue]" +labels: '' +assignees: '' + +--- + +Describe your issue here. diff --git a/README.md b/README.md index a54b9b0..26d7ffc 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,13 @@ Get it [here](https://laravel-news.com/tablar-laravel-dashboard-preset) +Please check the corresponding branch for the documentation. + +|Version|Branch| +|:-:|:-:| +|Laravel 11|[11.x branch](../../tree/11.x/README.md)| +|Laravel 10|[10.x branch](../../tree/10.x/README.md)| + ### Tablar Installation: Setting Up Laravel Tablar in Minutes [![Tablar](https://img.youtube.com/vi/ka26mSdmvIQ/0.jpg)](https://www.youtube.com/watch?v=ka26mSdmvIQ) @@ -38,10 +45,10 @@ Get it [here](https://laravel-news.com/tablar-laravel-dashboard-preset) ### Installation ```shell -composer require takielias/tablar:"^11" +composer require takielias/tablar ``` -### Demo - + +### Live Demo https://tablar.ebuz.xyz ```shell diff --git a/config/tablar.php b/config/tablar.php index 2d62a46..31a7600 100644 --- a/config/tablar.php +++ b/config/tablar.php @@ -228,4 +228,18 @@ */ 'vite' => true, + + /* + |-------------------------------------------------------------------------- + | Livewire + |-------------------------------------------------------------------------- + | + | Here we can enable the Livewire support. + | + | For detailed instructions you can look the livewire here: + | https://livewire.laravel.com + | + */ + + 'livewire' => false, ]; diff --git a/resources/views/auth/layout.blade.php b/resources/views/auth/layout.blade.php index fd6a7dd..22f779e 100644 --- a/resources/views/auth/layout.blade.php +++ b/resources/views/auth/layout.blade.php @@ -6,12 +6,20 @@ @yield('title') - - @vite('resources/js/app.js') + + + @if(config('tablar','vite')) + @vite('resources/js/app.js') + @endif + {{-- Custom Stylesheets (post Tablar) --}} + @yield('tablar_css') +
@yield('content')
- + +@yield('tablar_js') + diff --git a/resources/views/common/alert.blade.php b/resources/views/common/alert.blade.php index a012a66..f1db2f2 100644 --- a/resources/views/common/alert.blade.php +++ b/resources/views/common/alert.blade.php @@ -11,3 +11,10 @@
{{Session('error')}}
@endif +@if ($errors->any()) + @foreach ($errors->all() as $error) + + @endforeach +@endif diff --git a/resources/views/error.blade.php b/resources/views/error.blade.php new file mode 100644 index 0000000..25fe18c --- /dev/null +++ b/resources/views/error.blade.php @@ -0,0 +1,25 @@ +@hasSection('code') +
+
+
@yield('code')
+

Oops… You just found an error page

+

+ @yield('message') +

+ +
+
+@endif diff --git a/resources/views/layouts/boxed.blade.php b/resources/views/layouts/boxed.blade.php index 2b70249..2ae11d6 100644 --- a/resources/views/layouts/boxed.blade.php +++ b/resources/views/layouts/boxed.blade.php @@ -5,7 +5,11 @@ @include('tablar::partials.navbar.topbar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/combo.blade.php b/resources/views/layouts/combo.blade.php index ea09ebc..badef2d 100644 --- a/resources/views/layouts/combo.blade.php +++ b/resources/views/layouts/combo.blade.php @@ -9,7 +9,11 @@ @include('tablar::partials.header.sidebar-top')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/condensed.blade.php b/resources/views/layouts/condensed.blade.php index 249bdbe..fcae1dd 100644 --- a/resources/views/layouts/condensed.blade.php +++ b/resources/views/layouts/condensed.blade.php @@ -9,7 +9,11 @@ @include('tablar::partials.navbar.condensed-top')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/fluid-vertical.blade.php b/resources/views/layouts/fluid-vertical.blade.php index 66441a7..cf6a0b6 100644 --- a/resources/views/layouts/fluid-vertical.blade.php +++ b/resources/views/layouts/fluid-vertical.blade.php @@ -9,7 +9,11 @@ @include('tablar::partials.navbar.sidebar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/fluid.blade.php b/resources/views/layouts/fluid.blade.php index e44176a..5f15ce3 100644 --- a/resources/views/layouts/fluid.blade.php +++ b/resources/views/layouts/fluid.blade.php @@ -9,7 +9,11 @@ @include('tablar::partials.navbar.topbar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/horizontal.blade.php b/resources/views/layouts/horizontal.blade.php index 28ae99d..2c4e2b4 100644 --- a/resources/views/layouts/horizontal.blade.php +++ b/resources/views/layouts/horizontal.blade.php @@ -9,7 +9,11 @@ @include('tablar::partials.navbar.topbar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/navbar-overlap.blade.php b/resources/views/layouts/navbar-overlap.blade.php index ec4e635..ba63c0b 100644 --- a/resources/views/layouts/navbar-overlap.blade.php +++ b/resources/views/layouts/navbar-overlap.blade.php @@ -8,7 +8,11 @@ @include('tablar::partials.navbar.overlap-topbar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/navbar-sticky.blade.php b/resources/views/layouts/navbar-sticky.blade.php index 9a8469d..402c8ee 100644 --- a/resources/views/layouts/navbar-sticky.blade.php +++ b/resources/views/layouts/navbar-sticky.blade.php @@ -10,7 +10,11 @@
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/rtl.blade.php b/resources/views/layouts/rtl.blade.php index 28ae99d..2c4e2b4 100644 --- a/resources/views/layouts/rtl.blade.php +++ b/resources/views/layouts/rtl.blade.php @@ -9,7 +9,11 @@ @include('tablar::partials.navbar.topbar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/vertical-right.blade.php b/resources/views/layouts/vertical-right.blade.php index 1521514..0be379d 100644 --- a/resources/views/layouts/vertical-right.blade.php +++ b/resources/views/layouts/vertical-right.blade.php @@ -8,7 +8,11 @@ @include('tablar::partials.navbar.sidebar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/vertical-transparent.blade.php b/resources/views/layouts/vertical-transparent.blade.php index 7caff23..a7cd944 100644 --- a/resources/views/layouts/vertical-transparent.blade.php +++ b/resources/views/layouts/vertical-transparent.blade.php @@ -8,7 +8,11 @@ @include('tablar::partials.navbar.sidebar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/layouts/vertical.blade.php b/resources/views/layouts/vertical.blade.php index 5acff8e..141dde4 100644 --- a/resources/views/layouts/vertical.blade.php +++ b/resources/views/layouts/vertical.blade.php @@ -8,7 +8,11 @@ @include('tablar::partials.navbar.sidebar')
- @yield('content') + @hasSection('content') + @yield('content') + @endif + + @include('tablar::error') @include('tablar::partials.footer.bottom')
diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php index 83d975e..59824fe 100644 --- a/resources/views/master.blade.php +++ b/resources/views/master.blade.php @@ -14,14 +14,28 @@ @yield('title', config('tablar.title', 'Tablar')) @yield('title_postfix', config('tablar.title_postfix', '')) - + + @if(config('tablar','vite')) @vite('resources/js/app.js') @endif + + {{-- Livewire Styles --}} + @if(config('tablar.livewire')) + @livewireStyles + @endif + {{-- Custom Stylesheets (post Tablar) --}} @yield('tablar_css') + @yield('body') @include('tablar::extra.modal') + +{{-- Livewire Script --}} +@if(config('tablar.livewire')) + @livewireScripts +@endif + @yield('tablar_js') diff --git a/resources/views/page.blade.php b/resources/views/page.blade.php index d6b3223..997e2d6 100644 --- a/resources/views/page.blade.php +++ b/resources/views/page.blade.php @@ -9,7 +9,13 @@ @section('classes_body', $layoutHelper->makeBodyClasses()) -@includeIf('tablar::layouts.'. config('tablar.layout')) +@section('layout') + @if(isset($layout)) + @includeIf('tablar::layouts.' . $layout) + @else + @includeIf('tablar::layouts.'. config('tablar.layout')) + @endif +@show @section('tablar_js') @stack('js') diff --git a/resources/views/partials/header/notifications.blade.php b/resources/views/partials/header/notifications.blade.php index 15c8f91..e765840 100644 --- a/resources/views/partials/header/notifications.blade.php +++ b/resources/views/partials/header/notifications.blade.php @@ -1,123 +1,125 @@ -