Created
December 6, 2021 06:06
-
-
Save ifirmawan/61f00c6ccec89d0bed1fc9dbda2044b6 to your computer and use it in GitHub Desktop.
Laravel 8 install mix on shared hosting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\Support\Collection as SupportCollection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
use Illuminate\Support\Facades\Response; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Register any application services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
// | |
} | |
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
Response::macro('success', function ($value, $code = 200) { | |
return Response::make([ | |
'status' => 'success', | |
'data' => $value | |
], $code); | |
}); | |
Response::macro('fail', function ($value, $code = 404) { | |
return Response::make([ | |
'status' => 'fail', | |
'data' => $value | |
], $code); | |
}); | |
$this->app->bind('path.public', function() { | |
return base_path().'/../public_html'; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment