Learning Laravelcalculations 33 Sorting a collection 33 Sort() 33 SortBy() 34 SortByDesc() 35 Using reduce() 35 Using macro() to extend collections 36 Using Array Syntax 37 Chapter 9: Common Issues & Quick Fixes 39 Introduction equivalent directory for your OS) in your $PATH so the laravel executable can be located by your system. Once installed, the laravel new command will create a fresh Laravel installation in the directory conditional. • Using macro() to extend collections The macro() function allows you to add new functionality to Illuminate\Support\Collection objects Usage: Collection::macro("macro_name", function ($parameters)0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.0 Documentation
tail command documentation. The php artisan tinker command now utilizes the Boris REPL if your system supports it. The readline and pcntl PHP extensions must be installed to use this feature. If caching, consult the full documentation. To upgrade your User model for Laravel 5's authentication system, follow these instructions: Delete the following from your use block: use Illuminate\Auth\UserInterface; ~/.composer/vendor/bin directory in your PATH so the laravel executable can be located by your system. Once installed, the simple laravel new command will create a fresh Laravel installation in the0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 3.2 Documentationfew examples that we think make good bullet points: Bundles are Laravel's modular packaging system. The Laravel Bundle Repository is already populated with quite a few features that can be easily output the paging links in your view. Laravel automatically does the rest. Laravel's pagination system was designed to be easy to implement and easy to change. It's also important to note that just because Bundle::start. Allow the registration of custom database drivers. New, driver based authentication system. Added Input::json() method for working with applications using Backbone.js or similar. 0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 6.0 中文文档Homestead 站点的请求重定向到 Homestead 虚拟机。在 Mac 和 Linux 系统中,该文件位于 /etc/hosts,在 Windows 系统中, 该文件位于 C:\Windows\System32\drivers\etc\hosts。我们 以 homestead.test 域名映射为例,添加到 hosts 文件的记录如下 所示: 192.168.10.10 homestead.test Illuminate\Contracts\Routing\ResponseFactory; public function boot(ResponseFactory $response){ $response->macro('caps', function ($value) { // }); } 注册服务提供者 所有服务提供者都是通过配置文件 config/app.php 中进行注册,该 文件包含了一个列出所有服务提供者名字的 Laravel 中文学习资源:https://xueyuanjun.com 283 响应宏 如果你想要定义一个自定义的可以在多个路由和控制器中复用的响 应,可以使用 Response 门面上的 macro 方法。例如,在某个服务提 供者的 boot 方法中编写代码如下:0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.6 中文文档hosts 文件中,该文件会将对本地域名的请求重定向到 Homestead 虚拟机,在 Mac 或 Linux 上,该文件位于 /etc/hosts,在 Windows 上,位于 C:\Windows\System32\drivers\etc\hosts,添加方式如下: 192.168.10.10 homestead.test 确保 IP 地址和你的 Homestead.yaml 文件中列出的一致,一旦你将域名添加到 Illuminate\Contracts\Routing\ResponseFactory; public function boot(ResponseFactory $response){ $response->macro('caps', function ($value) { // }); } 注册服务提供者 所有服务提供者都是通过配置文件 config/app.php 中进 response()->file($pathToFile, $headers); 响应宏 如果你想要定义一个自定义的可以在多个路由和控制器中复用的响应,可以使用 Response 门面上的 macro 方法。例如,在某个服务提供者 的 boot 方法中编写代码如下:0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.2 中文文档文件中,该文件会将对 本地域名的请求重定向到 Homestead 虚拟机,在 Mac 或 Linux 上,该文件位 于 /etc/hosts,在 Windows 上,位于 C:\Windows\System32\drivers\etc\hosts,添加 方式如下: 192.168.10.10 homestead.app 确保 IP 地址和你的 Homestead.yaml 文件中列出的一致,一旦你将域名放置到 如果你想要定义一个自定义的响应并且在多个路由和控制器中复用,可以使用 Illuminate\Contracts\Routing\ResponseFactory 实现类或者 Response 门面上 的 macro 方法。 比如,在某个服务提供者的 boot 方法中编写代码如下: macro('caps', function ($value) { return Response::make(strtoupper($value)); }); } } macro 方法接收响应名称作为第一个参数,闭包函数作为第二个参数,macro 的闭包 在 ResponseFactory0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.1 中文文档hosts 文件,该文件会将对本地域名的 请求重定向到 Homestead 环境,在 Mac 或 Linux 上,该文件位于/etc/hosts,在 Windows 上,位于 C:\Windows\System32\drivers\etc\hosts,添加方式如下: 192.168.10.10 homestead.app 确保 IP 地址和你的 Homestead.yaml 文件中列出的一致,一旦你将域名放置到 @endif 4、响应宏 如果你想要定义一个自定义的响应并且在多个路由和控制器中复用,可以使用 Illuminate\Contracts\Routing\ResponseFactory 实现上的 macro 方法。 比如,在一个服务提供者的 boot 方法中: macro('caps', function ($value) use ($factory) { return $factory->make(strtoupper($value));0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.3 中文文档文件中,该文件会将对本地域 名的请求重定向到 Homestead 虚拟机,在 Mac 或 Linux 上,该文件位于 /etc/hosts,在 Windows 上,位于 C:\Windows\System32\drivers\etc\hosts,添加方式如下: 192.168.10.10 homestead.app 本文档由 Laravel 学院(LaravelAcademy.org)提供 Illuminate\Contracts\Routing\ResponseFactory; public function boot(ResponseFactory $factory){ $factory->macro('caps', function ($value) { // }); } 3、注册服务提供者 所有服务提供者都是通过配置文件 config/app.php response()->file($pathToFile, $headers); 4、响应宏 如果你想要定义一个自定义的可以在多个路由和控制器中复用的响应,可以使用 Response 门面 上的 macro 方法。 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 154 例如,在某个服务提供者的0 码力 | 691 页 | 9.37 MB | 1 年前3
The Laravel Handbook
there are other migrations, which are added by the Laravel framework itself for it’s authentication system. But let’s focus on creating a new table, let’s call it dogs . Go in the up() function of the the DigitalOcean panel) In Advanced Settings you can configure more details such as the Operating System, Database and PHP version: 86 I picked Postgres because I like that more, but it’s just a preference0 码力 | 111 页 | 14.25 MB | 1 年前3共 9 条- 1













