Laravel 5.6 中文文档注:要使用这个新特性,必须使用 memcached 或 redis 缓存驱动作为应用默认缓存驱动。此外,所有服务器必须和同一个中心缓存服务器进行通 信。 如果你的应用运行在多个服务器上,现在可以限定只在一台机器上运行调度任务。例如,假设你有一个在每周五晚上生成新报告的调度任务,如果任 务调度器运行在三个服务器上,这个调度任务就会在三台机器上运行并生成同样的报告三次,这样很不优雅,甚至很糟糕! 要指定任 要指定任务只在一台机器上运行,可以在定义调度任务时使用 onOneServer 方法,第一台获取到任务的机器会给这个任务上一把原子级别的锁来阻 止其他服务器同时运行同一个任务: $schedule->command('report:generate') ->fridays() ->at('17:00') 了,但是还有很多其他的小更新比如配置文件或注释的微调,就不会一一指出。你可以通 过 GitHub 比较工具 轻松查看变更以便选择那些对你而言更为重要的更新。 二、快速入门 安装配置 服务器要求 Laravel 框架对 PHP 版本和扩展有一定要求,不过这些要求 Laravel Homestead 都已经满足了,不过如果你没有使用 Homestead 的话(那真是一件 很遗憾的事情0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 6.0 中文文档Laravel 的发布周期将保持不变。 兼容 Laravel Vapor Laravel 6.0 提供了对 Laravel Vapor 的兼容,这是一个针对 Laravel 应用的自动扩容无服务器部署平台。Vapor 对在 AWS Lambda 上 管理 Laravel 应用以及与 SQS 队列、数据库、Redis 集群、网络、 CloudFront CDN 进行交互的复杂性进行了抽象。 * * @param \App\User $user * @param \App\Flight $flight * @return mixed */ public function view(User $user, Flight $flight) { return $this->deny('Explanation of denial.'); } 本文档由学院君提供 学院君致力于提供优质 接下来我们可以通过 Gate::inspect 方法获取授权策略的响应,然 后再通过响应示例的 message() 方法获取授权消息: $response = Gate::inspect('view', $flight); if ($response->allowed()) { // 用户被授权可以访问航班... } if ($response->denied()) { echo0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.1 中文文档在很多现代的 web 应用中,web 套接字被用于实现实时的,即时更新的用户接口,当服务 器上的某些数据更新后,通常一条消息将会通过 websocket 连接发送到客户端并进行处理。 为了帮助你构建这样类型的应用,Laravel 使得通过 websocket 连接广播事件变得简单可行。 广播 Laravel 事件允许你在服务端代码和客户端 JavaScript 框架之间共享相同的事件名称。 更多关于事件广播的内容请查看事件一节。 自动载入标准。 本文档由 Laravel 学院(LaravelAcademy.org)提供 9 二、开始 安装及配置 1、安装 1.1 服务器要求 Laravel 框架有少量的系统要求,当然,Laravel Homestead 虚拟机满足所有这些要求: PHP 版本 >= 5.5.9 PHP 扩展:OpenSSL Session Laravel 安装完成后,你还应该配置自己的本地环境,如数据库驱动、邮箱服务器、缓存驱 动等。 2.1.4 美化 URL Apache 框架中自带的 public/.htaccess 文件支持 URL 中隐藏 index.php,如过你的 Laravel 应用 使用 Apache 作为服务器,需要先确保 Apache 启用了 mod_rewrite 模块以支持.htaccess0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.3 中文文档5.2 的基础上继续进行优化,提供了大量新功能和新特性:基于驱动的通知系统; 通过 Laravel Echo 提供强大的实时支持;通过 Laravel Passport 实现无痛的 OAuth2 服务器;通过 Laravel Scout 实现全文模型搜索;在 Laravel Elixir 中支持 Webpack;“可邮寄”的对象;明确分离 web 和 api 路由;基于闭包的控制台命令;存储上传文件的辅助函数;支持 }); Laravel Echo,通过 NPM 安装的全新的 JavaScript 包,将和 Laravel 5.3 一起发布,用于为订阅频 道以及在客户端 JavaScript 应用中监听服务器端事件提供了简单、优美的 API,Echo 包含对 Pusher 和 Socket.io 的支持: Echo.channel('orders.' + orderId) .li 和事件广播的内容,请参考其对应文档。 Laravel Passport(OAuth2 服务器) 注:Laracasts 上提供了关于这一新特性的免费视频教程。 Laravle 5.3 使用 Laravel Passport 让 API 认证变得简单。Laravel Passport 可以在几分钟内为应用 提供一个完整的 Oauth2 服务器实现,Passport 基于 Alex Bilbie 维护的 League0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 5.2 中文文档ponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, 方法被废弃,直接使用 PHP 的 random_bytes 即可。 Str::equals 方法被废弃,直接使用 PHP 的 hash_equals 方法即可。 Illuminate\View\Expression 被废弃,使用 Illuminate\Support\HtmlString 即 可。 贡献代码 1、缺陷报告 为了鼓励促进更加有效积极的合作,Laravel 强烈鼓励使用 在代码提交前修复代码风格。 在此之前,需要安装全局工具,然后通过在项目根目录下运行如下命令检查代码风格: php-cs-fixer fix 二、开始 安装 1、服务器要求 Laravel 框架有对服务器有少量要求,当然,Laravel Homestead 已经满足所有这些要求, 所以我们强烈推荐使用 Homestead 作为 Laravel 本地开发环境。 如果你没有使用 H0 码力 | 377 页 | 4.56 MB | 1 年前3
Learning LaravelIncluding Partial Views 21 Layout Inheritance 22 Sharing data to all views 24 Using View::share 24 Using View::composer 24 Closure-based composer 24 Class-based composer 24 Execute arbitrary PHP Server Requirements 103 Local Development Server 104 Hello World Example (Basic) and with using a view 104 Hello World Example (Basic) 105 Web Server Configuration for Pretty URLs 105 Chapter 30: Helpers application 111 Using a different server 111 Requirements 112 Hello World Example (Using Controller and View) 113 Hello World Example (Basic) 114 Installation using LaraDock (Laravel Homestead for Docker)0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.0 Documentation
Responses ii. Redirects iii. Other Responses iv. Response Macros vi. Views i. Basic Usage ii. View Composers 5. Architecture Foundations i. Service Providers i. Introduction ii. Basic Provider allows for more efficient queries when using simple "Next" and "Previous" links in your pagination view. In production, destructive migration operations will now ask for confirmation. Commands may be forced sample instructional value for other team members). For more information on environment configuration, view the full documentation. Note: You will need to place the appropriate .env file and values on your0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 3.2 Documentation............................................................................................ 33 View Composers ....................................................................................... Laravel will handle the rest. View Composers are blocks of code that can be run when a view is loaded. A good example of this would be a blog side-navigation view that contains a list of random blog Your composer would contain the logic to load the blog posts so that all you have to do i load the view and it's all ready for you. This keeps you from having to make sure that your controllers load the0 码力 | 139 页 | 1.13 MB | 1 年前3
The Laravel Handbook
return the welcome view when someone visits the / URL using the GET HTTP method (the one used when you open the page in the browser): Route::get('/', function () { return view('welcome'); }); }); To do this we use the view() Laravel helper, which knows where to find the welcome view because Laravel uses a set of conventions. 13 We have folders and files dedicated to holding specific specific, well-defined parts of our applications. In this case the welcome view is defined in the file resources/views/welcome.blade.php : You can clear all the content of this file, and type0 码力 | 111 页 | 14.25 MB | 1 年前3
《Slides Dev Web》02. Introduction aux frameworks PHP
jsp?forum=106&thread=152104 1 Design Patterns et webdev • Inversion de contrôle (IoC4) • Model View Controller – M : Accès aux données, logique métier – V : Templates des pages à générer – C : Orchestration 5. DJANGO PROJECT. Django appears to be a MVC framework, but you call the Controller the « view », and the View the « template ». How come you don’t use the standard names? FAQ: General [en ligne]. [Consulté com/en/1.11/faq/general/#django-appears-to-be-a-mvc- framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come- you-don-t-use-the-standard-names 39https://github.com/smarty-php/smarty0 码力 | 24 页 | 1.03 MB | 1 年前3
共 11 条
- 1
- 2













