All Projects β†’ benjamincrozat β†’ laravel-blade-sugar

benjamincrozat / laravel-blade-sugar

Licence: WTFPL License
Add syntactic sugar to your Laravel Blade templates.

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to laravel-blade-sugar

Comments
Native comments for your Laravel application.
Stars: ✭ 390 (+2337.5%)
Mutual labels:  package, blade
Artisan View
πŸ‘€ Manage your views in Laravel projects through artisan
Stars: ✭ 708 (+4325%)
Mutual labels:  package, blade
Blogetc
Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.
Stars: ✭ 198 (+1137.5%)
Mutual labels:  package, blade
svelte-credit-card
A svelte component to render a credit card πŸ’³
Stars: ✭ 30 (+87.5%)
Mutual labels:  package
repogen
Easy-to-use signed APT repository generator with a web-based package browser.
Stars: ✭ 34 (+112.5%)
Mutual labels:  package
action
πŸ“¦πŸ“Š GitHub Action to reports on the size of your npm package
Stars: ✭ 36 (+125%)
Mutual labels:  package
larafy
Larafy is a Laravel package for Spotify API. It is more like a wrapper for the Spotify API.
Stars: ✭ 53 (+231.25%)
Mutual labels:  package
ferryd
Fast, safe and reliable transit for the delivery of software updates to users.
Stars: ✭ 43 (+168.75%)
Mutual labels:  package
route observer mixin
RouteObserveMixin provides easy access to didPush/didPop/didPushNext/didPopNext.
Stars: ✭ 27 (+68.75%)
Mutual labels:  package
scaffold-package-command
Scaffolds WP-CLI commands with functional tests, full README.md, and more.
Stars: ✭ 51 (+218.75%)
Mutual labels:  package
bali
Bali - Minimalist Golang build and packaging tool
Stars: ✭ 59 (+268.75%)
Mutual labels:  package
video-downloader
Video Downloader for Facebook.
Stars: ✭ 63 (+293.75%)
Mutual labels:  package
ux
Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire.
Stars: ✭ 34 (+112.5%)
Mutual labels:  package
classy
Light, well-structured WordPress theme framework based on β€œLaravel Blade” template engine
Stars: ✭ 74 (+362.5%)
Mutual labels:  blade
aplus
Aplus Command Line Tool
Stars: ✭ 71 (+343.75%)
Mutual labels:  package
laravel-blog
Laravel Blog package
Stars: ✭ 116 (+625%)
Mutual labels:  package
portuguese-utils
A set of useful utils for developing portuguese apps
Stars: ✭ 20 (+25%)
Mutual labels:  package
pkglite
Compact Package Representations
Stars: ✭ 16 (+0%)
Mutual labels:  package
oexec
oexec is a Go package to execute shell commands in specified order
Stars: ✭ 21 (+31.25%)
Mutual labels:  package
laravel-provider
The Laravel Framework Service Provider for Railt
Stars: ✭ 19 (+18.75%)
Mutual labels:  package

Build Status Latest Stable Version License Total Downloads

Laravel Blade Sugar

Add syntactic sugar to your templates.

Installation

composer require benjamincrozat/laravel-blade-sugar

Available directives

@action()

Generates an URL for a given controller action.

<a href="@action('SomeController@someAction', ['someParameter' => 'someValue'])">Some Link</a>

More in the official Laravel documentation: https://laravel.com/docs/helpers#method-action

@asset()

Renders an asset using the current URL scheme:

<img src="@asset('img/photo.jpg')">

More in the official Laravel documentation: https://laravel.com/docs/helpers#method-asset

@secureAsset()

Renders an asset using HTTPS:

<img src="@secureAsset('img/photo.jpg')">

More in the official Laravel documentation: https://laravel.com/docs/helpers#method-secure-asset

@config()

Displays a config value.

@config('foo.bar')
@config('foo.bar', 'Default value')
@config(['foo.bar' => 'Value'])

More in the official Laravel documentation: https://laravel.com/docs/helpers#method-config

@checked()

Automatically adds a checked attribute if your condition returns true.

<input type="radio" value="foo" @checked('foo' === $value)> <label>Choice #1</label>
<input type="radio" value="bar" @checked('bar' === $value)> <label>Choice #2</label>
<input type="radio" value="baz" @checked('baz' === $value)> <label>Choice #3</label>

@gravatar()

Automatically displays a Gravatar from a given email address.

<img src="@gravatar('[email protected]')">

@markdown()

Renders Markdown using Parsedown, which is built in Laravel.

@markdown('**Hello, World!**')

@mix()

Returns the path to a versioned Mix file.

<link rel="stylesheet" src="@mix('/path/to/some/styles.css')">
<script src="@mix('/path/to/some/script.js')"></script>

More in the official Laravel documentation: https://laravel.com/docs/helpers#method-mix

@old()

Retrieves an old input value flashed into the session:

<input type="text" name="foo" value="@old('foo')">

More in the official Laravel documentation: https://laravel.com/docs/helpers#method-old

@route()

Generates a URL for the given named route.

<a href="@route('posts.index')">Blog</a>
<a href="@route('posts.show', $post)">{{ $post->title }}</a>
<a href="@route('posts.show', $post, true)">{{ $post->title }}</a>

More in the official Laravel documentation: https://laravel.com/docs/helpers#method-route

@selected()

Adds a selected attribute if your condition returns true.

<select>
    <option value="draft" @selected('draft' === $post->status)>Draft</option>
    <option value="published" @selected('published' === $post->status)>Published</option>
</select>

@storageUrl()

Generates a URL from any supported storage.

<img src="@storageUrl($post->illustration)">
<img src="@storageUrl($post->illustration, 's3')">

@title()

Generates a title tag.

@title('My Page Title')
@title($optional_title, 'Fallback Title')

@url()

Generates a fully qualified URL to the given path.

<a href="@url('user/profile')">Register</a>
<a href="@url('user/profile', 'john-doe')">Register</a>
<a href="@url('some/other/route', [
    'foo' => 'bar',
    ...
])">Register</a>

More in the official Laravel documentation: https://laravel.com/docs/helpers#method-url

@with()

This directive let you assign new variables inside your Blade template.

@with('foo', 'bar')

{{ $foo }}

Instead of:

@php $foo = 'bar'; @endphp

{{ $foo }}

License

WTFPL

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].