2 weeks ago

code to upload audio

Posted 2 weeks ago by david001

This code given below uploads the image but when i try to upload audio(mp3) it gives me error undefined variable audio

    public function store(Request $request)
            $audio = $request->file('audio')->store('music');

        return redirect()->back();

Can anybody help to upload audio. Thanks

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