如何更改使用<com.astuetz.PagerSlidingTabStrip
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="55dp"
android:background="@color/transparent"
android:textColor="@color/white"
app:pstsDividerColor="@color/transparent"
app:pstsIndicatorColor="@color/bg_match_detail"
app:pstsIndicatorHeight="10dp"
app:pstsShouldExpand="true"
app:pstsTabBackground="@color/transparent"
app:pstsTabPaddingLeftRight="18dp"
app:pstsTextAllCaps="false"
app:pstsTriangleIndicator="true"
app:pstsUnderlineHeight="0dp" />
生成的身份验证组件的路由?
make:auth
包含
routes/web.php
如何更改注册路径,例如更改为Auth::routes();
?
答案 0 :(得分:1)
Laravel的Auth::routes();
使用auth()
中定义的函数vendor/laravel/framework/src/Illuminate/Routing/Router.php
您可以复制此功能的内容并将其直接粘贴到web.php
文件中,然后根据需要进行更新。
public function auth()
{
// Authentication Routes...
$this->get('login', 'Auth\LoginController@showLoginForm')->name('login');
$this->post('login', 'Auth\LoginController@login');
$this->post('logout', 'Auth\LoginController@logout')->name('logout');
// Registration Routes...
$this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'Auth\RegisterController@register');
// Password Reset Routes...
$this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
$this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
$this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
$this->post('password/reset', 'Auth\ResetPasswordController@reset');
}
所以在这里你可以改变/register
的路线。执行此操作时,请不要忘记从web.php中删除Auth::routes()
帮助程序。
答案 1 :(得分:0)
转到您的Auth控制器,您可以覆盖重定向
class RegisterController extends Controller
{
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/
use RegistersUsers;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/';