I've recently started working at a company here in Tokyo, Japan called HeyaTalent. I'm loving it so far, I working with my favorite framework in one of the most beautiful countries in the world.
But I noticed that I'm repeating myself a lot when I'm writing my code, as far as creating CRUD resources go.
I therefor decided to try my hand at creating my first ever Laravel Package! Yay!
It's a very simple package to use, but saves you tons of time.
Simply require the package with composer from packagist.
composer require heyatalent/laracrud
The package utilizes package auto-discovery, so you're all set after installing it.
Now you just need to decide the resource's name and call the command like so;
php artisan make:crud Post
This will generate a Controller, Model, Migration(which it will migrate), Views, and append your Resourceful Controller to the routes/web.php
file.
It also comes with some scaffolding, so that you can start using it right away.
If you have any thoughts or can think of any improvements then I'd love to hear from you!
Submit an issue in the Github repo or shoot me a message @juhlinus on Twitter.
I hope you get as much use out of this package as I will!
Until next time.
Top comments (0)