https://github.com/jimmerioles/laravel-dev-extras
A Laravel package with collection of helpful extra artisan console development commands and helpers.
https://github.com/jimmerioles/laravel-dev-extras
console helpers laravel package-development php
Last synced: 9 months ago
JSON representation
A Laravel package with collection of helpful extra artisan console development commands and helpers.
- Host: GitHub
- URL: https://github.com/jimmerioles/laravel-dev-extras
- Owner: jimmerioles
- License: mit
- Created: 2016-09-23T16:03:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-05T10:59:59.000Z (over 8 years ago)
- Last Synced: 2025-02-24T10:47:07.646Z (over 1 year ago)
- Topics: console, helpers, laravel, package-development, php
- Language: PHP
- Homepage:
- Size: 40 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Dev Extras
[](https://github.com/JimMerioles/Laravel-Dev-Extras/releases)
[](https://travis-ci.org/JimMerioles/Laravel-Dev-Extras)
[](https://github.com/JimMerioles/Laravel-Dev-Extras/commits/master)
[](https://packagist.org/packages/jim-merioles/laravel-dev-extras/stats)
[](https://github.com/JimMerioles/Laravel-Dev-Extras/blob/master/LICENSE.txt)
This Laravel package provide artisan developers with useful developement commands and helpers that are not included in Laravel by default.
## Installation
To get the latest version of Laravel Dev Extras, simply require the project using Composer:
```
$ composer require --dev jim-merioles/laravel-dev-extras
```
Once installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key:
```
/*
* Package Service Providers...
*/
JimMerioles\LaravelDevExtras\LaravelDevExtrasServiceProvider::class,
```
## Features:
### Repository Make Command:
Generates a repository class for a model.
#### Scenario:
Most of the time our code screams for a better architecture, and often we want our models to adhere to Repository Design Pattern for some reasons; for better integration with caching and other stuffs.
#### Usage:
```
$ php artisan make:repository FooRepository
```
###### Creates:
```
foo = $foo;
//
}
}
```
### Database Listener Helper:
Alias for:
```
DB::listen(function ($event) {
dump($event->sql);
dump($event->bindings);
dump($event->time);
});
```
#### Scenario:
Most of the time when tinkering with your database and eloquent models using `$ php artisan tinker`, you might want to listen for and dump sql queries, bindings and execution time to inspect or even just to verify if your cache works when no query has been made.
#### Usage:
```
Psy Shell v0.7.2 (PHP 7.0.11-1+deb.sury.org~trusty+1 — cli) by Justin Hileman
>>> db() // dumps queries, bindings, and execution time
```
## Contributing
Very open for suggestions and request. Please request an [issue](https://github.com/JimMerioles/Laravel-Dev-Extras/issues) or by [pull requests](/JimMerioles/Laravel-Dev-Extras/pull/new/master).
## Security Vulnerabilities
If you discover a security vulnerability, please send an e-mail to Jim Merioles at jimwisleymerioles@gmail.com. All security vulnerabilities will be promptly addressed.
## License
Laravel Dev Extras is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).