Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel save relationship to authorized user with parameter

auth()
    ->user()
    ->projects()
    ->attach(Project::find($request->project_id), [
        'start_date' => $request->start_date
    ]);
Source by github.com #
 
PREVIOUS NEXT
Tagged: #laravel #save #relationship #authorized #user #parameter
ADD COMMENT
Topic
Name
5+1 =