PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Dynamically Register a Service Provider

app()->register('App\Providers\MyCustomServiceProvider');

If you ever need to dynamically load a Service provider in your laravel application you can do so with the following line of code:

app()->register('App\Providers\MyCustomServiceProvider');

Make sure to add the correct namespace to your Custom Service Provider and it will dynamically be added when that line of code from above is executed.

This can come in handy if you have a bunch of Service Providers and not all of them need to be added with every application request.

BETA Snippet explanation automatically generated by OpenAI:

No explanation generated yet.

Snippet By Dev Dojo

ยท

Created June 12th, 2021

ยท

Report Snippet