boyjarv
1 month ago
117
3
Laravel

Form is refreshing and nothing is output

Posted 1 month ago by boyjarv

When I submit my form it just refreshes and noting submitted and nothing output (that works on administration but I recently copied it over for a user)

here is my route:

Route::post('venue/events/create', '[email protected]')->name('event.store');

my form action:

<form action="{{route('event.store')}}" method="post" enctype="multipart/form-data">@csrf

my eventStore method:

public function eventStore(EventPostRequest $request) {
        dd($request);
        $eventphoto = $request->file('eventPhoto')->store('public/events/photos');
        Event::create([
            'venue_id'=>request('venue_id'),
            'eventName'=>request('eventName'),
            'slug'=>str_slug(request('eventName')),
            'eventPhoto'=>$eventphoto,
            'eventDate'=>request('eventDate'),
            'eventTimeStart'=>request('eventTimeStart'),
            'eventTimeEnd'=>request('eventTimeEnd'),
            'eventType'=>request('eventType'),
            'eventCost'=>request('eventCost')
        ]);


        //return redirect()->back()->with('message','Event added successfully!');
    }

Please sign in or create an account to participate in this conversation.