Learning Laravel103 Setup 103 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 Running the 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 Chapter 33: Installation Guide 116 Remarks 116 Examples 116 Installation 116 Hello World Example (Basic) 117 Hello World Example With Views and Controller 117 The view 117 The controller 117 The0 码力 | 216 页 | 1.58 MB | 1 年前3
 Laravel 5.0 Documentation
a URI and a Closure : Route::get('/', function() { return 'Hello World'; }); Route::post('foo/bar', function() { return 'Hello World'; }); Route::put('foo/bar', function() { // }); Rou // }); Route::match(['get', 'post'], '/', function() { return 'Hello World'; }); Route::any('foo', function() { return 'Hello World'; }); Often, you will need to generate URLs to your routes, to a Response instance using the withCookie method: $response = new Illuminate\Http\Response('Hello World'); $response->withCookie(cookie('name', 'value', $minutes)); Flashing Input To The Session0 码力 | 242 页 | 1.44 MB | 1 年前3
 Laravel 5.1 中文文档路由接收一个 URI 和一个闭包: Route::get('/', function () { return 'Hello World'; }); Route::post('foo/bar', function () { return 'Hello World'; }); Route::put('foo/bar', function () { // }); Route::match(['get', 'post'], '/', function () { return 'Hello World'; }); 或者,还可以使用 any 方法注册一个路由响应所有 HTTP 动作: Route::any('foo', function () { return 'Hello World'; }); 生成路由对应的 URLs 可以使用帮助函数 url 来生成路由对应的 cookies 通过 withCookie 方法被 附加到 Illuminate\Http\Response 实例: $response = new Illuminate\Http\Response('Hello World'); $response->withCookie(cookie('name', 'value', $minutes)); return $response; 想要创建一个长期有效的0 码力 | 307 页 | 3.46 MB | 1 年前3
 Laravel 5.6 中文文档路由 路由入门 最基本的 Laravel 路由只接收一个 URI 和一个闭包,并以此为基础提供一个非常简单优雅的路由定义方法: Route::get('hello', function () { return 'Hello, Welcome to LaravelAcademy.org'; }); 我们以在安装配置文档中新建的 blog 应用为例,在 routes/web.php 中文学习资源:http://laravelacademy.org 44 在浏览器中通过 http://blog.test/hello (我使用 Valet 作为开发环境,故而对应域名是 blog.test,实际域名以自己配置的为准)即可访问我 们刚刚定义的路由,页面输出内容如下: Hello, welcome to LaravelAcademy.org 默认路由文件 所有 Laravel 路由都定义在位于 method="POST" action="/hello_from_form">'; }); Route::get('form_with_csrf_token', function () { return '0 码力 | 377 页 | 14.56 MB | 1 年前3
 Laravel 3.2 Documentationfunction() { return "Hello World!"; }); Registering a route that is valid for any HTTP verb (GET, POST, PUT, and DELETE): Route::any('/', function() { return "Hello World!"; }); Registering Registering a named route: Route::get('/', array('as' => 'home', function() { return "Hello World"; })); Generating a URL to a named route: $url = URL::to_route('home'); Redirecting to Admin_Home_Controller extends Base_Controller { public function action_index() { return "Hello Admin!"; } } 24 But, how do you register a bundle controller with the router? It's0 码力 | 139 页 | 1.13 MB | 1 年前3
 Laravel 6.0 中文文档Route::get('hello', function () { return 'Hello, Welcome to LaravelAcademy.org'; }); 我们以在安装配置文档中新建的 blog 应用为例, 在 routes/web.php 中定义该路由: 在浏览器中通过 http://blog.test/hello 即可访问我们刚刚定义 的路由,页面输出内容如下: Hello, welcome 中定义一组测试路由: Route::get('form_without_csrf_token', function (){ return ''; }); Route::get('form_with_csrf_token', function ''; }); Route::post('hello_from_form', function (){ return 'hello laravel!'; }); 我们在浏览器中访0 码力 | 1442 页 | 14.66 MB | 1 年前3
 Laravel 5.2 中文文档app/Http/routes.php 文件中。 最基本的 Laravel 路由接收一个 URI 和一个闭包: Route::get('foo', function () { return 'Hello World'; }); 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 21 cookie 通过 withCookie 方法 被附加到 Illuminate\Http\Response 实例: $response = new Illuminate\Http\Response('Hello World'); $response->withCookie(cookie('name', 'value', $minutes)); return $response; 想要创建一个长期有效的 aravel 提供了多种不同的方 式来返回响应,最基本的响应就是从路由或控制器返回一个简单的字符串: Route::get('/', function () { return 'Hello World'; }); 给定的字符串会被框架自动转化为 HTTP 响应。 Response 对象 然而,大多数路由和控制器动作都会返回一个完整的 Illuminate\Http\Response0 码力 | 377 页 | 4.56 MB | 1 年前3
 Laravel 5.3 中文文档Laravel 路由只接收一个 URI 和一个闭包,并以此提供一个非常简单且优雅的定义路由 方法: Route::get('foo', function () { return 'Hello World'; }); 默认路由文件 所有 Laravel 路由都定义位于 routes 目录下的路由文件中,这些文件通过框架自动加载。 routes/web.php 文件定义了 web cookie 附加到输出的 Illuminate\Http\Response 实例,你需要传 递名称、值、以及 cookie 有效期(分钟)到这个方法: return response('Hello World')->cookie( 'name', 'value', $minutes ); cookie 方法可以接收一些使用频率较低的参数,一般来说,这些参数和 PHP 原生函数 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 143 return response('Hello World')->cookie( 'name', 'value', $minutes, $path, $domain, $secure, $httpOnly ); 生成 Cookie0 码力 | 691 页 | 9.37 MB | 1 年前3
 《Slides Dev Web》02. Introduction aux frameworks PHP
HTTP/1.1 200 OK < Content-Type: text/html; charset=utf-8 <HE-Arc Hello HTTP est un protocole texte plutôt simple, jugez plutôt: Ce que nous voyons est une connexion TCP/IP
0 码力 | 24 页 | 1.03 MB | 1 年前3
 The Laravel Handbook
$name]); }); and in resources/views/test.blade.php write this code: @if (isset($name))Hello {{$name}}
@elseTest
@endif Now if you navigate with your browser to the /test/flavio0 码力 | 111 页 | 14.25 MB | 1 年前3
共 10 条
- 1
 













