【laravel5.4】PHP5.6+ 调用命名空间下类方法、属性和对象

1、调用命名空间的类方法,对象、属性

类对象:\App\User();

类方法:\App\User::find($this->user_id)    //查询构造器方法,将$this->user_id 设置成 view()->share('user_id',$this->user_id);

类属性:\App\User()->prop;

posted @ 2018-03-31 23:26  PHP急先锋  阅读(835)  评论(0编辑  收藏  举报