Downloads
Stars
Version
Takes out the boredom of boiler plating code and provides sensible defaults to jump start Laravel development:
##Pre-built Stuff
artisan generate:datatable
command.
##Minimum Requirements
##Installation
Create an empty directory and run composer create-project:
composer create-project zulfajuniadi/laravel-base .
Make sure you add your computer's hostname inside the bootstrap/start.php
file like so:
// L26
$env = $app->detectEnvironment(array(
'local' => array('homestead', 'ZulfaJuniadis-MacbookPro.local'),
));
You can get your computer's hostname by running hostname
via the terminal or command prompt
#Usage
##User Management
##CRUD Generator
artisan generate:datatable --fields="Todo:name:string, Done:is_done:boolean:default(0), User:user_id:integer, Project:project_id:integer" project_todos
##Uploadable Trait
The upload able trait enables upload for records of that model. No modifications needed on the database side to enable powerful uploads features.
Add UploadableTrait
to model:
// File: models/leaves.php
class Leaves extends Ardent {
use UploadableTrait;
To display the uploader form in your blade templates:
{{ $leave->yieldUploader(2 /*max size in MB*/, 'image/*' /*file type*/, 5 /*max files*/) }}
// where $leave is an instance of a Model that has the UploadableTrait
Other supported filetype arguments: image/*, application/pdf, .psd
To display the uploads in your blade templates:
{{ $leave->yieldUploadsTable() }}
// where $leave is an instance of a Model that has the UploadableTrait
To automatically generate thumbnails for your uploaded image add: protected $generate_image_thumbnails = true;
into the model.
#Todos