尊龙凯时人生就是搏

laravelÔõô×Ô¶¯ÉèÖÃ

laravelÊÇÏÖÔÚ×îÊ¢ÐеÄphp¿ò¼ÜÖ®Ò»¡£ËüµÄÇ¿Ê¢ºÍÎÞаÐÔÒѾ­Ó®µÃÁË¿í´ó¿ª·¢ÕßµÄÇàíù¡£ÆäÖÐÒ»¸ölaravelµÄÓŵã¾ÍÊÇËüµÄ×Ô¶¯ÉèÖá£ÔÚÕâƪÎÄÕÂÖÐ £¬ÎÒÃǽ«Ì½ÌÖlaravelµÄ×Ô¶¯ÉèÖÃÊÇÔõÑùÊÂÇéµÄ £¬ÒÔ¼°ÔõÑùʹÓÃËüÀ´Ìá¸ßÄúµÄ¿ª·¢Ð§ÂÊ¡£

Ò»¡¢LaravelµÄ×Ô¶¯ÉèÖøÅÊö

LaravelµÄ×Ô¶¯ÉèÖÿÉÒÔ×ÊÖúÄú¿ìËÙÉèÖÃÖÖÖÖЧÀͺÍ×é¼þ £¬¶øÎÞÐèÊÖ¶¯±àд´ó×ڵĴúÂë¡£ÕâЩ×é¼þ°üÀ¨Êý¾Ý¿âÅþÁ¬¡¢»º´æ¡¢ÐÐÁС¢Óʼþ¡¢ÈÏÖ¤¡¢ÊÚȨ¡¢ÊÂÎñµÈµÈ¡£ÕâÒâζ×ÅÄú¿ÉÒÔʹÓÃLaravelÄÚÖõĹ¦Ð§À´¿ìËٴһ¸ö¹¦Ð§Ç¿Ê¢µÄWebÓ¦ÓóÌÐò £¬¶øÎÞÐè×Ô¼ºÊµÏÖÕâЩ×é¼þ¡£

¶þ¡¢LaravelµÄЧÀÍÌṩÕß

LaravelµÄ×Ô¶¯ÉèÖÃÖ÷ÒªÒÀÀµÓÚЧÀÍÌṩÕß¡£Ð§ÀÍÌṩÕßÊÇÒ»¸öÀà £¬Ëü¿ÉÒÔ×¢²áÓ¦ÓóÌÐòÖеÄЧÀÍ¡£ÕâЩЧÀÍ°üÀ¨µ«²»ÏÞÓÚÒÔÏÂÄÚÈÝ£º

LaravelÄÚÖÃЧÀÍ£ºÀýÈçÊý¾Ý¿âÅþÁ¬¡¢»º´æ¡¢ÐÐÁеÈ¡£

×Ô½ç˵ЧÀÍ£ºÄú¿ÉÒÔ±àд×Ô¼ºµÄЧÀÍÌṩÕß £¬ÒÔ±ãÔÚÓ¦ÓóÌÐòÖÐ×¢²á×Ô½ç˵ЧÀÍ¡£

ЧÀÍÌṩÕß±ØÐè¼ÌÐøLaravel¿ò¼ÜÖеÄServiceProviderÀà¡£ServiceProviderÖÐÓÐÁ½¸ö½¹µãÒªÁìÐèҪʵÏÖ¡£»®·ÖÊÇregister()ºÍboot()¡£

register()ÒªÁì

register()ÒªÁìÖ÷ÒªÊÇÓÃÓÚ×¢²áЧÀÍ¡£ÔÚregister()ÒªÁìÖÐ £¬Äú¿ÉÒÔ½«Ð§ÀͰ󶨵½ÈÝÆ÷ÖÐ £¬ÒÔ±ãÔÚÓ¦ÓóÌÐòµÄÆäËüµØ·½Ê¹Óá£ÀýÈ磺

use IlluminateSupportServiceProvider;

class YourServiceProvider extends ServiceProvider
{
    public function register()
    {
        $this->app->bind('YourService', function ($app) {
            return new YourService($app['config']);
        });
    }
}

µÇ¼ºó¸´ÖÆ

ÔÚÉÏÊöÀý×ÓÖÐ £¬ÎÒÃǽ«Ð§ÀͰ󶨵½¡°YourService¡±Ãû³ÆÉÏ¡£µ±Ó¦ÓóÌÐòÐèҪʹÓøÃЧÀÍʱ £¬¿ÉÒÔͨ¹ýÈÝÆ÷À´»ñÈ¡¡£

boot()ÒªÁì

boot()ÒªÁìÖ÷ÒªÊÇÓÃÓÚÖ¸µ¼Ð§ÀÍ¡£ÔÚboot()ÒªÁìÖÐ £¬Äú¿ÉÒÔÖ´ÐÐһЩ³õʼ»¯²Ù×÷ £¬²¢ÎªÓ¦ÓóÌÐòÆô¶¯Ð§ÀÍ¡£ÀýÈ磺

use IlluminateSupportServiceProvider;

class YourServiceProvider extends ServiceProvider
{
    public function boot()
    {
        $this->publishes([
            __DIR__.'/path/to/config' => config_path('your-config.php'),
        ]);
    }
}

µÇ¼ºó¸´ÖÆ

ÔÚÉÏÊöÀý×ÓÖÐ £¬ÎÒÃÇʹÓÃpublishes()ÒªÁ콫ÉèÖÃÎļþÐû²¼µ½configĿ¼Ï¡£ÕâÑù £¬Ó¦ÓóÌÐò¾Í¿ÉÒÔʹÓøÃÉèÖá£

Èý¡¢LaravelµÄ×Ô¶¯·¢Ã÷

ËäÈ»LaravelµÄЧÀÍÌṩÕßÊǺÜÇ¿Ê¢ºÍÎÞаµÄ £¬¿ÉÊÇÊÖ¶¯×¢²áÿ¸öЧÀÍÌṩÕß»á±äµÃºÜÊÇ·±Ëö¡£LaravelµÄ×Ô¶¯·¢Ã÷¹¦Ð§Í¨¹ý¼ì²âÓ¦ÓóÌÐòÖеÄЧÀÍÌṩÕßÀ´×Ô¶¯×¢²áËüÃÇ¡£ÕâʹµÃ¿ª·¢Ö°Ô±¿ÉÒÔ¸üÇáËɵؼ¯³ÉµÚÈý·½ÌṩµÄ°ü¡£

LaravelµÄ×Ô¶¯·¢Ã÷¹¦Ð§Í¨¹ýcomposer.jsonÎļþÖеġ°extra¡±ÊôÐÔÀ´Íê³É¡£ÀýÈ磺

{
    "extra": {
        "laravel": {
            "providers": [
                "YourServiceProvider"
            ],
            "aliases": {
                "YourAlias": "YourFacade"
            }
        }
    }
}

µÇ¼ºó¸´ÖÆ

ÔÚÉÏÊöÀý×ÓÖÐ £¬ÎÒÃǽ«Ð§ÀÍÌṩÕß¡°YourServiceProvider¡±Ìí¼Óµ½×Ô¶¯·¢Ã÷µÄЧÀÍÌṩÕßÁбíÖС£

ËÄ¡¢LaravelµÄÓÖÃû

ÔÚLaravelÖÐ £¬ÓÖÃûÌṩÁËÒ»ÖÖ¸üÇáÓ¯µÄ·½·¨À´»á¼ûÓ¦ÓóÌÐòÖеÄÀà¡£Äú¿ÉÒÔʹÓÃÓÖÃûÀ´»á¼ûЧÀÍÌṩÕß¡¢ÃÅÃæ»òÈκÎÆäËüÀà¡£ÓÖÃû¿ÉÒÔÔÚЧÀÍÌṩÕßÖÐͨ¹ýaliasesÊôÐÔ½ç˵ £¬Ò²¿ÉÒÔÔÚcomposer.jsonÎļþÖÐͨ¹ý¡°extra¡±µÄ¡°aliases¡±ÊôÐÔ¾ÙÐнç˵¡£ÀýÈ磺

{
    "extra": {
        "laravel": {
            "aliases": {
                "YourAlias": "YourFacade"
            }
        }
    }
}

// »òÕß

use IlluminateSupportServiceProvider;

class YourServiceProvider extends ServiceProvider
{
    public function register()
    {
        $this->app->alias(YourFacade::class, 'YourAlias');
    }
}

µÇ¼ºó¸´ÖÆ

ÔÚÉÏÊöÀý×ÓÖÐ £¬ÎÒÃǸøYourFacadeÌí¼ÓÁËÒ»¸öÌåÃû¡°YourAlias¡±¡£

Îå¡¢×Ô½ç˵ÏÂÁî

LaravelµÄ×Ô¶¯ÉèÖù¦Ð§»¹¿ÉÒÔÈÃÄúÇáËɵؽ¨ÉèºÍ×¢²á×Ô½ç˵ÏÂÁî¡£ÄúÖ»ÐèÒª¼ÌÐøLaravelµÄArtisan¿ØÖÆ̨ÏÂÁîÀà £¬²¢½«ËüÃÇ´æ´¢ÔÚÓ¦ÓóÌÐòµÄ¡°app/Console/Commands¡±Îļþ¼ÐÖм´¿É¡£Laravel»á×Ô¶¯É¨Ãè¸ÃÎļþ¼Ð²¢×¢²áÄã½ç˵µÄËùÓÐ×Ô½ç˵ÏÂÁî¡£

Áù¡¢×ܽá

LaravelµÄ×Ô¶¯ÉèÖù¦Ð§ÉÁ¿ª·¢Ö°Ô±¿ÉÒÔ¸üÇáËɵؽ¨ÉèÖØ´óµÄWebÓ¦ÓóÌÐò¡£Ê¹ÓÃЧÀÍÌṩÕß¡¢ÓÖÃû¡¢×Ô¶¯·¢Ã÷ºÍ×Ô½ç˵ÏÂÁî £¬Äú¿ÉÒÔÌá¸ß¿ª·¢Ð§ÂÊ £¬²¢ïÔÌ­ÊÖ¶¯±àд´ó×ڵĴúÂë¡£ÕÆÎÕLaravelµÄ×Ô¶¯ÉèÖÃÊÖÒÕ½«ÊÇÄúÀֳɿª·¢»ùÓÚLaravelµÄWebÓ¦ÓóÌÐòµÄÒªº¦¡£

ÒÔÉϾÍÊÇlaravelÔõô×Ô¶¯ÉèÖõÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ