MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 258 forks source link

Dark Mode Support and Authentication #402

Open AdamKyle opened 2 years ago

AdamKyle commented 2 years ago

I did not see this in your docs, I am curious if you support dark mode or not. If not, is there some way I can add it with out editing the vendor files for future updates?

I also noticed the table will not work, that is you cannot use pagination if you are logged out. For example:

namespace App\Flare\View\Livewire;

use App\Flare\Models\Item;
use Mediconesystems\LivewireDatatables\Column;
use Mediconesystems\LivewireDatatables\Http\Livewire\LivewireDatatable;
use Mediconesystems\LivewireDatatables\NumberColumn;

class ItemsTable extends LivewireDatatable
{

    public function builder()
    {
        return Item::query()->whereNotIn('type', ['quest', 'alchemy'])->whereNull('item_prefix_id')->whereNull('item_suffix_id');
    }

    public function columns()
    {
        return [
            NumberColumn::name('id')
                ->label('ID'),

            Column::name('name')
                ->label('Name'),

            NumberColumn::name('cost')
                ->label('Gold Cost'),
        ];
    }
}

This will load when logged out, but clicking on the pagination gives me a 302 and states I have to login. Is there a way to disable that? Or maybe it's a user error of some kind? Once I login the table works fully, but I also need it to work when the user is not logged in.