Git Product home page Git Product logo

blade-plus-plus's Introduction

Build Status Latest Stable Version Total Downloads License

Laravel Blade Directives

Extended Laravel Blade Directives

Installation

$ composer require cleaniquecoders/blade-plus-plus
$ php artisan vendor:publish --provider="CleaniqueCoders\BladePlusPlus\BladePlusPlusServiceProvider"

Starting version 2.1.0, when publishing the resources, it will publish to resources/views/vendor/blade-plus-plus instead of resources/views/vendor/laravel-blade-directives. Do consider to update your codes.

Usage

Available directives based on category:

Actions

@baseAction([
	'label' => 'Google',
	'href' => 'https://google.com',
	'icon' => 'fa-google'
])

@createAction([
	'label' => 'New User',
	'href' => route('users.create'),
])

@editAction([
	'label' => 'Edit User',
	'href' => route('users.edit', 1),
])

@showAction([
	'label' => 'Show User',
	'href' => route('users.show', 1),
])

@destroyAction([
	'label' => 'Delete User',
	'href' => route('users.destroy', 1),
	'id' => 'destroy-user-1'
])

Card

@card 
	@slot('card_title')

	@endslot
	
	@slot('card_body')

	@endslot

	@slot('card_footer')

	@endslot
@endcard

Form

@input([
	'id' => 'name',
	'name' => 'name',
])

@input([
	'id' => 'email',
	'name' => 'email',
	'type' => 'email'
])

@input([
	'id' => 'password',
	'name' => 'password',
	'type' => 'password'
])

@input([
	'id' => 'password_confirmation',
	'name' => 'password_confirmation',
	'type' => 'password'
])

Layout

@container
	@row 
		@col('col-6')

		@endcol

		@col('col-6')

		@endcol
	@endrow
@endcontainer

Modal

@modal 
	@slot('modal_body')

	@endslot

	@slot('modal_footer')

	@endslot
@endmodal

Table

@table 
	@slot('thead')

	@endslot
	
	@slot('tbody')

	@endslot

	@slot('tfooter')

	@endslot
@endtable

Misc.

@appName

@icon('fa fa-search')

Test

Run the following command:

$ vendor/bin/phpunit  --testdox --verbose

Contributing

Thank you for considering contributing to the LaravelBladeDirectives!

Bug Reports

To encourage active collaboration, it is strongly encourages pull requests, not just bug reports. "Bug reports" may also be sent in the form of a pull request containing a failing test.

However, if you file a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.

Remember, bug reports are created in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the bug report will automatically see any activity or that others will jump to fix it. Creating a bug report serves to help yourself and others start on the path of fixing the problem.

Coding Style

LaravelBladeDirectives follows the PSR-2 coding standard and the PSR-4 autoloading standard.

You may use PHP CS Fixer in order to keep things standardised. PHP CS Fixer configuration can be found in .php_cs.

License

This package is open-sourced software licensed under the MIT license.

blade-plus-plus's People

Contributors

dependabot[bot] avatar nasrulhazim avatar nazrulwazir avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

nazrulwazir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.