I am creating a command in laravel, where I copy my views correctly to the views folder, but it happens that I want to add some routes and I do it in the following way
file_put_contents(
base_path('routes/web.php'),
file_get_contents(__DIR__.'/stubs/make/routes.stub'),
FILE_APPEND
);
I add the routes correctly but this is done every time I use the command php artisan make: micommand, is there any way to evaluate that if the routes already exist do not add them?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2mUKcAJ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire