app/Http/Controllers/RemarkController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        Validator::make($request->all(),[
            "project_id" => 'required|exists:projects,id',
            "body" => "required|string"
        ])->validate();
        $request['user_id']=auth()->user()->id;
        remark::create($request->all());
    return  redirect()->back()->with(['success'=>'Done create remake on project']);
    }
public function store ( Request $ request ) { Validator :: make ( $ request -> all ( ) , [ " project_id " => 'required|exists:projects,id' , " body " => " required|string " ] ) -> validate ( ) ; $ request [ 'user_id' ] = auth ( ) -> user ( ) -> id ; remark :: create ( $ request -> all ( ) ) ; return redirect ( ) -> back ( ) -> with ( [ 'success' => 'Done create remake on project' ] ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .