jaseofspades88 liked a comment+100 XP
4mos ago
jaseofspades88 wrote a reply+100 XP
5mos ago
This is documented here: https://laravel.com/docs/12.x/authentication#redirecting-authenticated-users.
use Illuminate\Http\Request;
->withMiddleware(function (Middleware $middleware): void {
$middleware->redirectUsersTo('/panel');
// Using a closure...
$middleware->redirectUsersTo(fn (Request $request) => route('panel'));
})
These changes should be made in the empty closure you will find in the bootstrap/app.php.
jaseofspades88 wrote a reply+100 XP
5mos ago
jaseofspades88 wrote a reply+100 XP
5mos ago
What problem are you trying to solve? Are you trying to get the schema for use elsewhere?
I imagine you're using v3 and older as the improvements to components and such in v4 solves this problem... however, I would recommend you simply abstract out the fields you need into a static method on a class. ToolbarActionForm or something, which has a static get method, which returns the array of the components you require.
