Where to register Facades & Service Providers in Lumen

后端 未结 3 993
情书的邮戳
情书的邮戳 2021-01-31 08:33

I Am looking for where to add the facade below in Lumen.

\'JWTAuth\' => \'Tymon\\JWTAuth\\Facades\\JWTAuth\'

EDITED

Also where to re

3条回答
  •  渐次进展
    2021-01-31 09:24

    In your bootstrap\app.php

    Example for Provider

    // XML parser service provider
    $app->register(\Nathanmac\Utilities\Parser\ParserServiceProvider::class);
    // GeoIP
    $app->register(\Torann\GeoIP\GeoIPServiceProvider::class);
    $app->withEloquent();
    

    Example for Alias

    // SERVICE ALIASES
    class_alias(\Nathanmac\Utilities\Parser\Facades\Parser::class, 'Parser');
    class_alias(\Torann\GeoIP\Facades\GeoIP::class, 'GeoIP');
    $app->withFacades();
    ...
    ...
    ...
    

    Good luck

提交回复
热议问题