Learning Laraveland View) 113 Hello World Example (Basic) 114 Installation using LaraDock (Laravel Homestead for Docker) 114 Installation 114 Basic Usage 115 Chapter 33: Installation Guide 116 Remarks 116 Examples Introduction to laravel-5.3 123 Introduction 123 Examples 123 The $loop variable 123 Chapter 36: Laravel Docker 124 Introduction 124 Examples 124 Using Laradock 124 Chapter 37: Laravel Packages 125 Examples https://riptutorial.com/ 24 use Illuminate\Contracts\View\View; class SomeComposer { public function compose(View $view) { $view->with('somedata', $data); } } These examples use '*' in0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 6.0 中文文档在浏览器中通 过 http://localhost:8000 即可访问应用: 当然,更强大的本地开发环境选择还是 Homestead 和 Valet,还可 以使用 Laradock 基于 Docker 环境进行开发。如果你觉得它们都不 方便,或者安装配置太费劲,在 Windows 环境下,还可以选 择 Laragon。 配置 Laravel 初始化配置 本文档由学院君提供 学院君致力于提供优质 此外,你还可以选择性安装以下软件: Apache Blackfire Cassandra Chronograf CouchDB Crystal & Lucky Framework Docker Elasticsearch Gearman Go Grafana InfluxDB MariaDB MinIO MongoDB MySQL provider: virtualbox authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: ~/Docker/wwwroot/laravel6 to: /home/vagrant/code sites: - map: homestead.test to: /home/vagrant/code/public0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.0 Documentation
App\Http\Composers directory. Now that we have registered the composer, the ProfileComposer@compose method will be executed each time the profile view is being rendered. So, let's define the composer */ public function compose(View $view) { $view->with('count', $this->users->count()); } } Just before the view is rendered, the composer's compose method is called with the0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 5.1 中文文档Laravel 学院(LaravelAcademy.org)提供 50 现在我们已经注册了 composer,每次 profile 视图被渲染时都会执行 ProfileComposer@compose,接下来我们来定义该 composer 类: compose(View $view) { $view->with('count', $this->users->count()); } } 本文档由 Laravel 学院(LaravelAcademy.org)提供 51 视图被渲染前,composer 的 compose 方法被调用,同时 Illumin0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.2 中文文档注册,需要添加该服务提供者到配 置文件 config/app.php 的 providers 数组中。 现在我们已经注册了 Composer,每次 profile 视图被渲染时都会执 行 ProfileComposer@compose,接下来我们来定义该 Composer 类: compose(View $view) { $view->with('count', $this->users->count()); } } 视图被渲染前,Composer 类的 compose 方法被调用,同 时 Illuminate\Contracts\View\View0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.3 中文文档providers 数组中。 现 在 我 们 已 经 注 册 了 Composer , 每 次 profile 视 图 被 渲 染 时 都 会 执 行 ProfileComposer@compose,接下来我们来定义该 Composer 类: compose(View $view) { $view->with('count', $this->users->count()); } } 视图被渲染前,Composer 类的 compose 方法被调用,同时 Illuminate\Contracts\View\View0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 5.6 中文文档注册,需要添加该服务提供者到配置文件 config/app.php 的 providers 数组中。 现在我们已经注册了视图 Composer,每次 profile 视图被渲染时都会执行 ProfileComposer@compose 方法,接下来我们来定义该 Composer 类: compose(View $view) { $view->with('count', $this->users->count()); } 本文档由 Laravel 学院提供 Laravel 学院致力于提供优质 Laravel 中文学习资源:http://laravelacademy.org 94 } 视图被渲染前,Composer 类的 compose 方法被调用,同时 Illuminate\View\View 实例被注入该方法,从而可以使用其 with 方法来绑定数据到视 图。 注:所有视图 Composer 都通过服务容器被解析,所以你可以在0 码力 | 377 页 | 14.56 MB | 1 年前3
共 7 条
- 1













