pyaesone17 / laracrud
Laravel CRUD Package
Requires
- php: >=5.4.0
- laravel/framework: ~5.0
This package is not auto-updated.
Last update: 2024-10-26 18:17:37 UTC
README
Laracrud is a scalfolding CRUD generator for Laravel Framework. Dont Repeat Yourself with the thing you always do , just generate it.
##Installation
You can install this package via composer using this command:
composer require pyaesone17/laracrud:dev-master
Documentation
My packages is fully depends on laravel eloquent model . So you have to create Model first and include attributes in fillable array.
<? php namespace App; use Illuminate\Database\Eloquent\Model; class Candidate extends Model { protected $fillable=['father','mother']; public $textareas=['hi','hay']; } ?>
Dont Forget to register Service Provider Like this in config/app.php
'providers' => [
............................................,
Veve\Laracrud\LaracrudServiceProvider::class,
]
Then you can easily create my generator like this
php artisan crud:create Candidate
It will generate (Route,Controller,Repositories,Migration Files,CRUD view)
- resourceful route
- resourceful controller (CandidateController inside the Http/Controllers)
- Base Repository and ChildRepository (BaseRepository and CandidateRepository in Repositories folder)
- Migration file (create_candidates_table in migration folder)
- CRUD template in views folder (crud_candidate view is located inside the views folder)
But you have to define master.blade.php and include bootstrap framework in your master view to work well with my CRUD template.
##Tips
- In generating , you will be asked whether to generate repo or not.
- If you chose yes, it will create repo and controller that match the repo,
- Otherwise it will create simple controller that use Model directly.
##Note Why I chose to output html code directly ?
Because HTML code is more readable and you can easily change or modify the code.
##Todos
- creating migration file with many fields
- creating more methods in Base Repo
- So Many Things