Question:
How do I customize controller actions in Laravel Jetstream?

Problem:

I would like to add some data to the Create Vue file for the teams feature in Laravel Jetstream, but I haven't seen a way to publish the vendor controllers. Essentially, what I am trying to do is add the ability on the team creation page to specify a different owner to the team you are currently creating, rather than just defaulting to the current user.


Solution:

Jetstream implements a pattern that uses actions instead of publishing routes and controllers.


You can customize the Action that creates a Team in your 

app/Actions/Jetstream/CreateTeam.php file.


The Action files should be published with the installation of Jetstream.


Suggested blogs:

>How to register a schedule with the controller?

>How to resolve the Composer dependency conflicts (Symfony)?

>How to get item details of Woo Commerce in custom email content?

>PHP cURL to upload video to azure blob storage

>How to merge cells with HTML, CSS, and PHP?


Ritu Singh

Ritu Singh

Submit
0 Answers