1
I know there’s a command php artisan down
to activate the maintenance mode, but I have my application hosted and do not know how to give this command. Would you have any other way to do this? Editing some file?
1
I know there’s a command php artisan down
to activate the maintenance mode, but I have my application hosted and do not know how to give this command. Would you have any other way to do this? Editing some file?
3
Yes it is possible without terminal, but first I will talk about php artisan down
, it is not because you have moved a project to the server that the command artisan
will work. Usually we only move the project or do all installation inside the server and even the project of a client will be in a repository so we work on the basis of the composer update
.
Basically you will have to install the composer
and the laravel
(and artisian) on the production server and download your client’s project by git
(or other similar method) and the access will probably be all by SSH
.
But this is ample to explain. Without delay I will explain how to do this without using the terminal
, you can create two routes (preferably with authentication) and use the method Artisan::call
:
Route::get('/admin/down', function()
{
return Artisan::call('down');
});
Route::get('/admin/up', function()
{
return Artisan::call('up');
});
By calling something like http://site/admin/down
it will go into maintenance mode and use http://site/admin/up
he’ll be back to normal.
Browser other questions tagged laravel laravel-5
You are not signed in. Login or sign up in order to post.
Show, I will do here soon then. And as for the installation of the Composer and the Server I will give a read on this tbm.
– Raylan Soares
@Raylansoares on most servers is unviable, we usually do this when we use "servers" like AWS.
– Guilherme Nascimento
Oh so these standard hosting q we have around on shared server nor rolls right
– Raylan Soares
founded here, vlw!
– Raylan Soares
@Raylansoares not really shared server will have many limitations and even if it is possible maybe it is too much work, the best is to work locally and send via
ftp
, for other commands use theArtisan::call
combined with routes.– Guilherme Nascimento