app/Http/Controllers/admin/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)
    {
        $request->validate([
            'title' => ['required'],
            'image' => ['required'],
            'jobs_count' => ['required'],
            'sort' => ['required']
        ]);
        Categories::create($request->all());
        return redirect()->route('admin.company.index');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'title' => [ 'required' ] , 'image' => [ 'required' ] , 'jobs_count' => [ 'required' ] , 'sort' => [ 'required' ] ] ) ; Categories :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'admin.company.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .