app/Http/Controllers/CompanyController.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)
    {
        $this->validate($request,[
            'name' => 'required|max:100',
            'description' => 'required|max:500',
            'phone' => 'required|max:20',
            'email' => 'required|email',
            'image' => 'required',
            'address' => 'required',
            'contentInfo' => 'required'
        ]);
        $company = new Company();
        $company = Company::setData($company, $request);
        $company->save();
        return redirect()->route('company_job.index');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'name' => 'required|max:100' , 'description' => 'required|max:500' , 'phone' => 'required|max:20' , 'email' => 'required|email' , 'image' => 'required' , 'address' => 'required' , 'contentInfo' => 'required' ] ) ; $ company = new Company ( ) ; $ company = Company :: setData ( $ company , $ request ) ; $ company -> save ( ) ; return redirect ( ) -> route ( 'company_job.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .