app/Http/Controllers/Admin/BrandTypesController.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) {
        $data = $this->validate(\request(),
            [
                'title_ar' => 'required',
                'title_en' => 'required',
                'marka_id' => 'required',
            ]);
        MarkaType::create($data);
        session()->flash('success', trans('messages.added_s'));
        return redirect( route('brand_types.show',$request->marka_id));
    }
public function store ( Request $ request ) { $ data = $ this -> validate ( \ request ( ) , [ 'title_ar' => 'required' , 'title_en' => 'required' , 'marka_id' => 'required' , ] ) ; MarkaType :: create ( $ data ) ; session ( ) -> flash ( 'success' , trans ( 'messages.added_s' ) ) ; return redirect ( route ( 'brand_types.show' , $ request -> marka_id ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .