Learning LaravelSharing data to all views 24 Using View::share 24 Using View::composer 24 Closure-based composer 24 Class-based composer 24 Execute arbitrary PHP code 25 Chapter 6: Cashier 26 Remarks 26 Examples 26 HelpersServiceProvider.php 48 Use 49 Chapter 15: CustomException class in Laravel 50 Introduction 50 Examples 50 CustomException class in laravel 50 Chapter 16: Database 51 Examples 51 Multiple database Directory Structure 68 Examples 68 Change default app directory 68 Override Application class 68 Calling the new class 68 Composer 69 Change the Controllers directory 69 Chapter 21: Eloquent 70 Introduction0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.0 Documentation
Introduction ii. Explanation iii. Practical Usage iv. Creating Facades v. Mocking Facades vi. Facade Class Reference v. Request Lifecycle i. Introduction ii. Lifecycle Overview iii. Focus On Service Providers using the new app:name Artisan command. Controllers, middleware, and requests (a new type of class in Laravel 5.0) are now grouped under the app/Http directory, as they are all classes related to application. Instead of a single, flat file of route filters, all middleware are now broken into their own class files. A new app/Providers directory replaces the app/start files from previous versions of Laravel0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 3.2 Documentation................................................................................. 41 Bundles & Class Loading ......................................................................................... ........................................................................................... 45 Class Auto Loading .................................................................................... ................................................................................ 48 The Logger Class..................................................................................................0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 5.2 中文文档\App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\ \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, ], 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 3 'api' protected $dontReport = [ AuthorizationException::class, HttpException::class, ModelNotFoundException::class, ValidationException::class, ]; 隐式模型绑定 Laravel 5.2 支持“隐式模型绑定”,以便在路由和控制器中基于0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.6 中文文档{order}', OrderChannel::class); 最后,可以将频道的授权逻辑放到频道类的 join 方法。join 方法中的代码等同于之前位于频道授权闭包中的处理逻辑。当然,你还可以使用频道模 型绑定: class OrderChannel { App\Providers; use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services App\Providers; use Illuminate\Pagination\Paginator; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 6.0 中文文档Illuminate\Support\Facades\Redis; 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 6 class RateLimited { /** * 处理队列任务. * * @param mixed $job * @param callable $next * @return mixed __('If you did not receive the email') }},0 码力 | 1442 页 | 14.66 MB | 1 年前3
The Laravel Handbook
form to add dogs to the table. To do so, first we create a Dog model. What’s a model? A model is a class that allows us to interact with data stored in the database. Each model represents a specific table the class inclues some classes under a “Eloquent” folder. Eloquent is an ORM (object-relational mapper), a tool that basically lets us interact with a database using a (PHP, in this case) class. The Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Dog extends Model { use HasFactory; protected $fillable = ['name']; } A model0 码力 | 111 页 | 14.25 MB | 1 年前3
Laravel 5.3 中文文档namespace App; use Laravel\Scout\Searchable; use Illuminate\Database\Eloquent\Model; class Post extends Model { use Searchable; } trait 被添加到模型之后,当保存模型实例的时候其信息将会被同步到搜索索引: $order 上有关于该特性的免费视频教程。 Laravel 5.3 支持可邮寄对象,这些对象可以以一个简单对象的形式表示邮件信息,而不再需要在 闭包中自定义邮件信息,例如,你可以定义一个简单的邮寄对象用作欢迎邮件: class WelcomeMessage extends Mailable { use Queueable, SerializesModels; /** * Build Mail::to($user)->send(new WelcomeMessage); 当然,你还可以标记可邮寄对象为“队列化”,这样这封邮件就会在后台通过队列任务发送: class WelcomeMessage extends Mailable implements ShouldQueue { // } 更多可邮寄对象细节请查看其对应文档。 存储上传文件0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 5.1 中文文档创建一个 RoleMiddleware 来接收角 色名称作为额外参数: class RoleMiddleware { /** * 运行请求过滤器. * * @param \Illuminate\Http\Request $request App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Ba seVerifier; class VerifyCsrfToken extends BaseVerifier { /** *从 CSRF 验证中排除的 URL * * @var array 中间件中,我们只允许提供的 age 大于 200 的访问路由,否则,我们将用户重定向到主页: class OldMiddleware { /** * 返回请求过滤器 * * @param \Illuminate\Http\Request $request0 码力 | 307 页 | 3.46 MB | 1 年前3
共 9 条
- 1













