Regress to add parsedown to service container
This commit is contained in:
parent
a09648c79d
commit
d01daa4137
|
|
@ -7,7 +7,6 @@ use URL;
|
|||
use Mail;
|
||||
use View;
|
||||
use Session;
|
||||
use Parsedown;
|
||||
use App\Models\User;
|
||||
use App\Models\Texture;
|
||||
use Illuminate\Http\Request;
|
||||
|
|
@ -39,7 +38,7 @@ class UserController extends Controller
|
|||
'players' => $this->calculatePercentageUsed($user->players->count(), option('score_per_player')),
|
||||
'storage' => $this->calculatePercentageUsed($user->getStorageUsed(), option('score_per_storage'))
|
||||
],
|
||||
'announcement' => (new Parsedown())->text(option_localized('announcement'))
|
||||
'announcement' => app('parsedown')->text(option_localized('announcement'))
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ class AppServiceProvider extends ServiceProvider
|
|||
View::addExtension('tpl', 'blade');
|
||||
// Make the priority of *.blade.php higher than *.tpl
|
||||
View::addExtension('blade.php', 'blade');
|
||||
|
||||
$this->app->singleton('parsedown', \Parsedown::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user