21 lines
397 B
PHP
21 lines
397 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Helpers\Auth;
|
||
|
|
||
|
trait RedirectsUsers
|
||
|
{
|
||
|
/**
|
||
|
* Get the post register / login redirect path.
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function redirectPath(): string
|
||
|
{
|
||
|
if (method_exists($this, 'redirectTo')) {
|
||
|
return $this->redirectTo();
|
||
|
}
|
||
|
|
||
|
return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';
|
||
|
}
|
||
|
}
|