ngtfkx/laradeck-commands

A set of useful Laravel artisan commands

1.0.0 2017-09-13 19:43 UTC

This package is not auto-updated.

Last update: 2024-11-10 05:14:12 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

A set of useful Laravel artisan commands

  • php artisan laradeck:view {name} Create a new view
  • php artisan laradeck:download {url} Download file from url

Install

Downloading

Via Composer

$ composer require ngtfkx/laradeck-commands

Registering the service provider

If you're using Laravel 5.5+, you can skip this step. The service provider will have already been registered thanks to auto-discovery.

Otherwise, add line Ngtfkx\Laradeck\Commands\LaradeckCommandsServiceProvider::class, manually in your config\app.php file.

Usage

laradeck:view

# Create a new view
php artisan laradeck:view admin.users.show
# Create a new view and rewrite old with same name
php artisan laradeck:view admin.users.show --force
# Create a new view with @extends directive
php artisan laradeck:view admin.users.show --extends=layouts.app
# Create a new view with @section directive
php artisan laradeck:view admin.users.show --section=content --section=sidebar
# Create a new view with @section directive (other syntax)
php artisan laradeck:view admin.users.show --section=content,sidebar

Similarly for @push (--stack) and @component (--component) directives.

laradeck:download

# download file and save it as storage/app/8SE_CIgzZw8.jpg
php artisan laradeck:download https://pp.userapi.com/c7008/v7008434/a3dc5/8SE_CIgzZw8.jpg
# download file and save it as storage/app/123.jpg
php artisan laradeck:download https://pp.userapi.com/c7008/v7008434/a3dc5/8SE_CIgzZw8.jpg --name=123.jpg
# download file and save it as storage/app/test/photo/123.jpg
php artisan laradeck:download https://pp.userapi.com/c7008/v7008434/a3dc5/8SE_CIgzZw8.jpg --name=123.jpg --path=test/photo

Change log

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

Credits

License

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