Posts Learn Snippets Categories Tags About
/

How to Enable Laravel Telescope Dark Mode

Learn how to enable Laravel Telescope dark/night mode for better accessibility and reduce strain on eyes

Created on Jul 20, 2021

8 views

To enable the dark/night mode on Laravel Telescope you can define the "Telescope::night()" option inside your "TelescopeServiceProvider" class.
Telescope::night();

You can refer the full code example from below.
# app/Providers/TelescopeServiceProvider.php


<?php namespace App\Providers; use Illuminate\Support\Facades\Gate; use Laravel\Telescope\IncomingEntry; use Laravel\Telescope\Telescope; use Laravel\Telescope\TelescopeApplicationServiceProvider; class TelescopeServiceProvider extends TelescopeApplicationServiceProvider { /** * Register any application services. * * @return void */ public function register() { Telescope::night(); /* Other Codes */ } /* Other Codes */ }

Created by

PostSrc poster

PostSrc

Full stack developer mainly focusing on the front end side of the web. The main author of PostSrc and loves writing tutorial and guides online.