Skip to content

Instantly share code, notes, and snippets.

@EmmanuelObua
Last active May 13, 2021 07:05
Embed
What would you like to do?
App Service Provider
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
//Add the schema facade
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//Provide migration string() function default value.
Schema::defaultStringLength(191);
//Register laravel telescope service provider only when the application is in local environment
if ($this->app->isLocal()) {
$this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
$this->app->register(TelescopeServiceProvider::class);
}
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment