The Laravel Handbook
what we need in no time. Breeze scaffolds user registration, login, password reset, profile page, dashboard… and even API authentication. It’s great. For more advanced needs we also have JetStream, but Breeze@auth Dashboard @else Log Register link to create a new account: 61 Create an account and you will be shown a dashboard page at the /dashboard route: 62 If you go back to the home, you will see the page in the logged in state:0 码力 | 111 页 | 14.25 MB | 1 年前3Laravel 5.1 中文文档
->type('Taylor', 'name') ->check('terms') ->press('Register') ->seePageIs('/dashboard'); } 更多有关测试的内容,请查看测试一节。 模型工厂 Laravel 现在可以通过使用模型工厂附带一种简单的方式类创建 Eloquent 模型存根,模型工 厂允许你为 Eloquent Route::group(['as' => 'admin::'], function () { Route::get('dashboard', ['as' => 'dashboard', function () { // Route named "admin::dashboard" 本文档由 Laravel 学院(LaravelAcademy.org)提供 21 }]); URL,有很多方式来生成 RedirectResponse 实例,最简单的方法就是 使用全局帮助函数 redirect: Route::get('dashboard', function () { return redirect('home/dashboard'); }); 有时候你想要将用户重定向到前一个位置,比如,表单提交后,验证不通过,你就可以使用 back 帮助函数返回前一个 URL:0 码力 | 307 页 | 3.46 MB | 1 年前3Laravel 5.2 中文文档
Route::group(['as' => 'admin::'], function () { Route::get('dashboard', ['as' => 'dashboard', function () { // 路由被命名为 "admin::dashboard" }]); }); 为命名路由生成 URL 如果你为给定路由进行了命名,就可以通过 route URL,有很多方式来生成 RedirectResponse 实例,最简单的方法就 是使用全局辅助函数 redirect: Route::get('dashboard', function () { return redirect('home/dashboard'); }); 有时候你想要将用户重定向到上一个请求的位置,比如,表单提交后,验证不通过,你就 可以使用辅助函数 back 返回到前一个 之后存储状态信息时特别方便: Route::post('user/profile', function () { // 更新用户属性... return redirect('dashboard')->with('status', 'Profile updated!'); }); 当然,用户重定向到新页面之后,你可以从 Session 中取出并显示这些一次性信息,比 如,使用0 码力 | 377 页 | 4.56 MB | 1 年前3Laravel 5.0 Documentation
'App\Http\ViewComposers\ProfileComposer'); // Using Closure based composers... View::composer('dashboard', function() { }); } } Note: Laravel does not include a default directory }); You may also attach a view composer to multiple views at once: View::composer(['profile', 'dashboard'], 'App\Http\ViewComposers\MyViewComposer'); You may use the composers method to register a group (Auth::attempt(['email' => $email, 'password' => $password])) { return redirect()->intended('dashboard'); } } } The attempt method accepts an array of key / value pairs as its first argument0 码力 | 242 页 | 1.44 MB | 1 年前3Laravel 5.6 中文文档
URL,有很多方式来生 成 RedirectResponse 实例,最简单的方法就是使用全局辅助函数 redirect: Route::get('dashboard', function () { return redirect('home/dashboard'); }); 有时候你想要将用户重定向到上一个请求的位置,比如,表单提交后,验证不通过,你就可以使用辅助函数 back 返回到前一个 之后存储状态信息时特别方便: Route::post('user/profile', function () { // 更新用户属性... return redirect('dashboard')->with('status', 'Profile updated!'); }); 用户重定向到新页面之后,你可以从 Session 中取出并显示这些一次性信息,使用 Blade 语法实现如下: s\ProfileComposer' ); // 使用基于回调函数的 composers... View::composer('dashboard', function ($view) {}); } /** * 注册服务提供者. * * @return void0 码力 | 377 页 | 14.56 MB | 1 年前3Laravel 3.2 Documentation
validate, and either redirect to the login form with an error message or redirect your user to their dashboard. Class Auto Loading keeps you from having to maintain an autoloader configuration and from function() { Route::get('panel', function() { // }); Route::get('dashboard', function() { // }); }); Named Routes Constantly generating URLs or redirects Route::controller('home'); Registering several controllers with the router: Route::controller(array('dashboard.panel', 'admin')); Once a controller is registered, you may access its methods using a simple0 码力 | 139 页 | 1.13 MB | 1 年前3Laravel 6.0 中文文档
URL,有很多方式来生 成 RedirectResponse 实例,最简单的方法就是使用全局辅助函 数 redirect: Route::get('dashboard', function () { return redirect('home/dashboard'); }); 有时候你想要将用户重定向到上一个请求的位置,比如,表单提交后, 验证不通过,你就可以使用辅助函数 back 返回到前一个 action 之后 存储状态信息时特别方便: Route::post('user/profile', function () { // 更新用户属性... return redirect('dashboard')->with('status', 'Prof ile updated!'); }); 用户重定向到新页面之后,你可以从 Session 中取出并显示这些一次 性信息,使用 Blade 'profile', 'App\Http\ViewComposers\ProfileC omposer' ); // 使用基于回调函数的 composers... View::composer('dashboard', function ($view) {}); } /** * 注册服务提供者. * * @return void */ public function register()0 码力 | 1442 页 | 14.66 MB | 1 年前3Laravel 5.3 中文文档
org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 149 Route::get('dashboard', function () { return redirect('home/dashboard'); }); 有时候你想要将用户重定向到上一个请求的位置,比如,表单提交后,验证不通过,你就可以使 用辅助函数 back 返回到前一个 之后存储状态信息时特别方便: Route::post('user/profile', function () { // 更新用户属性... return redirect('dashboard')->with('status', 'Profile updated!'); }); 当然,用户重定向到新页面之后,你可以从 Session 中取出并显示这些一次性信息,例如,使用 ProfileComposer' ); // 使用基于闭包的 composers... view()->composer('dashboard', function ($view) {}); } /** * 注册服务提供者. * * @return void0 码力 | 691 页 | 9.37 MB | 1 年前3Learning Laravel
fully qualified URL to the given path. if your site is hello.com echo url('my/dashboard'); would return hello.com/my/dashboard if nothing is passed to the url method it would return an instance of I0 码力 | 216 页 | 1.58 MB | 1 年前3CakePHP Cookbook 4.x
example, the following URL could be used to paginate both tags and articles at the same time: /dashboard?article[page]=1&tag[page]=3 See the Paginating Multiple Results section for how to generate scoped $this->Html->link( 'Dashboard', ['controller' => 'Dashboards', 'action' => 'index', '_full' => true] ); Will output: Dashboard Specify confirm example, the following URL could be used to paginate both tags and articles at the same time: /dashboard?article[page]=1&tag[page]=3 See the Paginating Multiple Results section for how to generate scoped0 码力 | 1249 页 | 1.04 MB | 1 年前3
共 17 条
- 1
- 2