The @use directive to import PHP classes in Blade templates
@use('App\Enums\WidgetStatusEnum', 'Status')
@use('App\Models\Bar')
{{ Status::Foo }}
{{ Bar::first() }}
A blog on PHP, JavaScript, and more
@use('App\Enums\WidgetStatusEnum', 'Status')
@use('App\Models\Bar')
{{ Status::Foo }}
{{ Bar::first() }}
composer create-project laravel/laravel="8.1.*" ProjectName
Just run the following command in the console and you’ll be able to edit the webpage you’re on.
document.designMode = 'on'
nah () {
git reset --hard
git clean -df
if [ -d ".git/rebase-apply" ] || [ -d ".git/rebase-merge" ]; then
git rebase --abort
fi
}
Awesome Sponsors
Download my eBook
(Includes PHP 8.1, 8.2, and 8.3)
Follow me everywhere