Remove the remaining use of the lang facade
This commit is contained in:
@@ -163,7 +163,6 @@ return [
|
||||
'Form' => 'Illuminate\Support\Facades\Form',
|
||||
'HTML' => 'Illuminate\Support\Facades\HTML',
|
||||
'Input' => 'Illuminate\Support\Facades\Input',
|
||||
'Lang' => 'Illuminate\Support\Facades\Lang',
|
||||
'Log' => 'Illuminate\Support\Facades\Log',
|
||||
'Redirect' => 'Illuminate\Support\Facades\Redirect',
|
||||
'Request' => 'Illuminate\Support\Facades\Request',
|
||||
|
||||
@@ -5,7 +5,6 @@ use Dingo\Api\Transformer\TransformableInterface;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingTrait;
|
||||
use Illuminate\Support\Facades\Lang;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
class Component extends Model implements TransformableInterface
|
||||
@@ -74,7 +73,7 @@ class Component extends Model implements TransformableInterface
|
||||
*/
|
||||
public function getHumanStatusAttribute()
|
||||
{
|
||||
return Lang::get('cachet.component.status.'.$this->status);
|
||||
return trans('cachet.component.status.'.$this->status);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,7 @@ class Incident extends Model implements TransformableInterface
|
||||
*/
|
||||
public function getHumanStatusAttribute()
|
||||
{
|
||||
$statuses = Lang::get('cachet.incident.status');
|
||||
$statuses = trans('cachet.incident.status');
|
||||
|
||||
return $statuses[$this->status];
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ API::error(function (\Illuminate\Database\Eloquent\ModelNotFoundException $excep
|
||||
App::missing(function ($exception) {
|
||||
if (Request::is('dashboard*') or Request::is('api*')) {
|
||||
return Response::view('errors.404', [
|
||||
'pageTitle' => Lang::get('cachet.dashboard.not_found_title'),
|
||||
'pageTitle' => trans('cachet.dashboard.not_found_title'),
|
||||
], 404);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,15 +13,15 @@ View::composer('index', function ($view) {
|
||||
$incidentCount = $incidents->count();
|
||||
|
||||
if ($incidentCount === 0 || ($incidentCount >= 1 && (int) $incidents->first()->status === 4)) {
|
||||
$status = 'success';
|
||||
$message = Lang::get('cachet.service.good');
|
||||
$status = 'success';
|
||||
$message = trans('cachet.service.good');
|
||||
} else {
|
||||
$status = 'danger';
|
||||
$message = Lang::get('cachet.service.bad');
|
||||
$status = 'danger';
|
||||
$message = trans('cachet.service.bad');
|
||||
}
|
||||
} else {
|
||||
$status = 'danger';
|
||||
$message = Lang::get('cachet.service.bad');
|
||||
$message = trans('cachet.service.bad');
|
||||
}
|
||||
|
||||
$view->with([
|
||||
|
||||
Reference in New Issue
Block a user