app/Http/Controllers/Admin/front/ProjectController.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(CreateRequest $request)
    {
        $image = basename($request->imageFile->store("public" , 'public'));
        $request['image'] = $image;
        Project::create($request->all());
        session()->flash('msg', "s: تم إضافة المشروع بنجاح");
        return redirect(route('projects.index'));
    }
public function store ( CreateRequest $ request ) { $ image = basename ( $ request -> imageFile -> store ( " public " , 'public' ) ) ; $ request [ 'image' ] = $ image ; Project :: create ( $ request -> all ( ) ) ; session ( ) -> flash ( 'msg' , " s: تم إضافة المشروع بنجاح"); return redirect ( route ( 'projects.index' ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .