Learning Laravelcode into their parent. For example: parent.blade.php: is child page!" in red, while View::make('otherpage') will produce the same html, except with the text "This is another page!" in blue instead. It is common to separate the view files, e.g. having a document.php text = '') { return $text; } } Create a helpers.php file, let's assume for now it lives in app/Helpers/document0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 3.2 Documentationthat echos the text that is passed to it. We create the printer.php file in the libraries folder with the following code. text) { echo $text; } } You can now call Printer::write('this text is being echod from the write method!') from anywhere within your application. Auto Loading Libraries and Models are very easy to different languages. The Lang class provides a simple mechanism to help you organize and retrieve the text of your multilingual application. All of the language files for your application live under the0 码力 | 139 页 | 1.13 MB | 1 年前3
《Slides Dev Web》 05. JavaScript & DOM
Utiliser DOM • Conseillé d’inclure le code (attribut src) type vaut par défaut text/javascript. The type attribute gives the language of the script or format of the data. […] The default, which is used if the attribute is absent, is “text/javascript”. HTML5: document.getElementById('date').addEventListener("change", validateDate); }; • …et HTML • Dégradation élégante – Alternatives pour un browser ne supportant pas0 码力 | 10 页 | 91.95 KB | 1 年前3
Laravel 5.0 Documentation
application will invalidate the cookie. First, add a new, nullable remember_token of VARCHAR(100), TEXT, or equivalent to your users table. Next, if you are using the Eloquent authentication driver, Cache Schema::create('cache', function($table) { $table->string('key')->unique(); $table->text('value'); $table->integer('expiration'); }); Introduction Basic Usage The Illuminate\Support\Collection Storage::put('file.jpg', $contents); Storage::prepend('file.log', 'Prepended Text'); Storage::append('file.log', 'Appended Text'); Storage::delete('file.jpg'); Storage::delete(['file1.jpg', 'file2.jpg']);0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 5.2 中文文档legacy-database 驱动。 如果你想要使用新的驱动,还需要添加 user_id (nullable integer)、ip_address (nullable string) 以及 user_agent (text) 列到存放 Session 的数据表中。 Stringy 框架不再内置 Stringy 库,如果要在应用中使用,你需要通过 Composer 手动安装。 验证 ValidatesRequests 等同于数据库中的 VARCHAR 列 . $table->string('name', 100); 等同于数据库中的 VARCHAR,带一个长度 $table->text('description'); 等同于数据库中的 TEXT 类型 $table->time('sunrise'); 等同于数据库中的 TIME 类型 $table->tinyInteger('numbers'); string body - text 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 131 comments id - integer post_id - integer body - text likes id0 码力 | 377 页 | 4.56 MB | 1 年前3
The Laravel Handbook
method="post" action="{{ route('dog.create') }}"> @csrf Run php border-b pb-2 mb-3 mt-4"> Add a new dog text take all the space available, and “pushes” the button to the far right. Then we add a route named0 码力 | 111 页 | 14.25 MB | 1 年前3
Laravel 5.6 中文文档还提供了一个全局的辅助函数 old(),如果你是在 Blade 模板中显示上次输入数据,使用辅助函数 old() 更方便,如果给定参数没有对应输 入,返回 null: Cookie 从请求中取出 Cookie 为了安全起见,Laravel 框架创建的所有 Cookie ponse', function () { return response('Hello World', 200) ->header('Content-Type', 'text/plain'); }); 添加响应头 大部分响应方法都可以以方法链的形式调用,从而可以流式构建响应(流接口模式)。例如,在发送响应给用户前可以使用 header 方法来添加一系 列响应头: Cookie::queue('author', '学院君', 1); return response('Hello Laravel', 200) ->header('Content-Type', 'text/plain'); }); 我们在浏览器中访问 http://blog.test/cookie/response 就能看到这两个新增的 Cookie: Cookie & 加密 默认情况下,Laravel0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.1 中文文档等同于数据库中的 VARCHAR 列 . $table->string('name', 100); 等同于数据库中的 VARCHAR,带一个长度 $table->text('description'); 等同于数据库中的 TEXT 类型 $table->time('sunrise'); 等同于数据库中的 TIME 类型 $table->tinyInteger('numbers'); } 现在,当你更新 Comment 时,所属模型 Post 将也会更新其 updated_at 值: $comment = App\Comment::find(1); $comment->text = 'Edit to this comment!'; $comment->save(); 集合 1、简介 Eloquent 返回的所有多结果集都是 Illuminate\Datab App\User::find(1); if ($user->is_admin) { // } 4.1 数组转换 array 类型转换在处理被存储为序列化 JSON 的字段是特别有用,例如,如果数据库有一个 TEXT 字段类型包含了序列化 JSON,添加 array 类型转换到该属性将会在 Eloquent 模型 中访问其值时自动将其反序列化为 PHP 数组:0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 6.0 中文文档还提供了一个全局的辅助函数 old(),如果你是在 Blade 模 板中显示上次输入数据,使用辅助函数 old() 更方便,如果给定参 数没有对应输入,返回 null: Cookie 从请求中取出 Cookie 为了安全起见,Laravel 框架创建的所有 Cookie Route::get('cookie/response', function () { return response('Hello World', 200) ->header('Content-Type', 'text/plain'); }); 添加响应头 大部分响应方法都可以以方法链的形式调用,从而可以流式构建响应 (流接口模式)。例如,在发送响应给用户前可以使用 header 方法 来添加一系列响应头: Cookie::queue('author', '学院君', 1); return response('Hello Laravel', 200) ->header('Content-Type', 'text/plain'); }); 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 274 我们在浏览器中访问 http://blog0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.3 中文文档用$event->job->payload()来获取对应数据。 失败任务表 如果你的应用有了 failed_jobs 表,需要添加 exception 字段到这张表,exception 字段应该是 TEXT 类型,用于保存导致队列任务失败的异常字符串。 在传统风格队列任务上序列化模型 通常,Laravel 的队列任务通过传递任务实例到 Queue::push 方法添加到队列,不过,一些应用会 Laravel 学院致力于提供优质 Laravel 中文学习资源 142 辅助函数 old 更方便,如果给定参数没有对应输入,返回 null: Cookies 从请求中取出 Cookies Laravel 框架创建的所有 cookies lable(); $table->string('ip_address', 45)->nullable(); $table->text('user_agent')->nullable(); $table->text('payload'); $table->integer('last_activity'); }); 你可以使用 Artisan 命令0 码力 | 691 页 | 9.37 MB | 1 年前3
共 15 条
- 1
- 2













