PHP code example of jeremykenedy / laravel-darkmode-toggle

1. Go to this page and download the library: Download jeremykenedy/laravel-darkmode-toggle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jeremykenedy / laravel-darkmode-toggle example snippets


'persist_route' => '/profile/dark-mode',
'routes' => ['enabled' => false],
bash
php artisan darkmode:install --css=tailwind --frontend=blade
jsx
import DarkmodeToggle from './vendor/darkmode-toggle/DarkmodeToggle'

export default function Nav() {
    return <DarkmodeToggle persistUrl="/darkmode/preference" />
}
bash
php artisan vendor:publish --tag=darkmode-config
bash
php artisan darkmode:update
bash
php artisan darkmode:update --css=bootstrap5
php artisan darkmode:update --frontend=vue
php artisan darkmode:update --css=tailwind --frontend=livewire
bash
php artisan darkmode:switch --css=bootstrap5
php artisan darkmode:switch --frontend=livewire
php artisan darkmode:switch --css=tailwind --frontend=vue