lundi 3 juillet 2017

public path in localhost and on server

I'm developing my application on localhost and I transfer it into server side.

I have a problem with $path:

$request->file('video')->move($path, $video);

on localhost I must use:

$request->file('video')->move(
            public_path().'/assets/videos/tutorials\/', $video
        );

but on server side I must use:

$request->file('video')->move(
            'assets/videos/tutorials/', $video
        );

It takes a lot of time for me. because everytime that I want to upload my codes on server, I must change $path.

Is there any solutions?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire