Skip to content

make blade with artisan, just call php artisan make:blade you can create file blade, create template syntax html or blade with stub file and auto insert to your blade

License

Notifications You must be signed in to change notification settings

yaza-putu/artisan-blade

Repository files navigation

Make blade file laravel with artisan command

artisan command


Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Requirement

  • Laravel 9.*
  • PHP 8.1

Description

This package can make blade file laravel with artisan command, and setup a template html with stub file

Installation

You can install the package via composer:

composer require yaza/artisan-blade --dev

You can publish the config file with (Optional):

php artisan vendor:publish --tag="artisan-blade-config"

Usage

artisan command

  1. Create file blade
php artisan make:blade blade_name
  1. Create file blade with directory
php artisan make:blade path/blade_name
  1. Create file blade with template stub (note : you need publish config this package)
php artisan make:blade path/blade_name --stub=stubfile

Make and customize template stub file

  1. you need publish this config with
php artisan vendor:publish --tag="artisan-blade-config"
  1. setting config path
<?php
return [
    /*
    * Default location template
    */
    "path" => "template",

    /*
    * select default stub file
    */
    "default" => "default"
];
  1. you need create folder template in folder resources
  2. create file *.stub, if you set the default stub file as default you need create default.stub in folder template folder structure

Example

  1. php artisan make:blade user artisan blade
  2. php artisan make:user --stub=modal stub modal

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

make blade with artisan, just call php artisan make:blade you can create file blade, create template syntax html or blade with stub file and auto insert to your blade

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages