随笔分类 -  Laravel

摘要:Service Container: https://laravel-china.org/articles/789/laravel-learning-notes-the-magic-of-the-service-container https://www.cnblogs.com/lyzg/p/618 阅读全文
posted @ 2019-05-13 10:44 Victor!!!! 阅读(71) 评论(0) 推荐(0)
摘要:首先,需要创建一个类来集成Facade类 <?php namespace App\Facades\GeoIP\Facade; use Illuminate\Support\Facades\Facade; class GeoIP extends Facade { protected static fu 阅读全文
posted @ 2019-05-05 14:47 Victor!!!! 阅读(215) 评论(0) 推荐(0)
摘要:Facade是容器中的类的静态代理,可以调用容器中任何对象的任何方法。 Route::get(‘/cache’, function(){ return Cache::get(‘key’); }); 要使用Facade,首先需要继承‘Illuminate\Support\Facades\Facade’ 阅读全文
posted @ 2019-05-05 14:46 Victor!!!! 阅读(250) 评论(0) 推荐(0)