app/Http/Controllers/GovernorateController.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([
            "name" =>"required|min:3|max:10",
        ]);
        $gov = Governorate::create($request->all());
        return redirect(route('governorate.index'));
    }
public function store ( Request $ request ) { $ request -> validate ( [ " name " => " required|min:3|max:10 " , ] ) ; $ gov = Governorate :: create ( $ request -> all ( ) ) ; return redirect ( route ( 'governorate.index' ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .