All Projects → amamarul → boiler-plate-commands

amamarul / boiler-plate-commands

Licence: MIT license
Package to generate automatic cruds for Laravel BoilerPlate Apps

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to boiler-plate-commands

lara-crud
This package will give an opportunity to get a very flexible admin panel that will satisfy you most of the time.
Stars: ✭ 33 (+153.85%)
Mutual labels:  crud
node-typescript-starter
REST API using Node with typescript, KOA framework. TypeORM for SQL. Middlewares JWT (auth), CORS, Winston Logger, Error, Response
Stars: ✭ 19 (+46.15%)
Mutual labels:  crud
node-github-publish
Publishes a file to a repository through the GitHub Contents API
Stars: ✭ 20 (+53.85%)
Mutual labels:  crud
http-node-api
O objetivo dessa aplicação era criar uma API sem nenhuma dependência externa, apenas utilizando as bibliotecas nativas do NodeJS. Tudo foi feito utilizando 100% Javascript.
Stars: ✭ 44 (+238.46%)
Mutual labels:  crud
express-crud-router
Simply expose resource CRUD (Create Read Update Delete) routes for Express & Sequelize. Compatible with React Admin Simple Rest Data Provider
Stars: ✭ 109 (+738.46%)
Mutual labels:  crud
luya-module-admin
Administration base module for all LUYA admin modules
Stars: ✭ 45 (+246.15%)
Mutual labels:  crud
CRUD.ASPCore.Reactjs.WebAPI.EF
CRUD Operations in ASP.NET Core application using React.js , Web API and Entity Framework core DB first approach with the help of VS 2017.
Stars: ✭ 80 (+515.38%)
Mutual labels:  crud
react-native-firebase-firestore-crud-example
React Native Firebase Tutorial: Build CRUD Firestore App
Stars: ✭ 24 (+84.62%)
Mutual labels:  crud
Exemplos
Este repositório guarda exemplos de códigos e aplicações para você reaproveitar em seus projetos.
Stars: ✭ 60 (+361.54%)
Mutual labels:  crud
ionicfirebasecrud
An example of crud with Firebase and Ionic
Stars: ✭ 15 (+15.38%)
Mutual labels:  crud
FullStack-Angular-SpringBoot
Customer Relationship Managment [Full-stack Web Development using Angular & SpringBoot (RestFull API)]
Stars: ✭ 48 (+269.23%)
Mutual labels:  crud
react-crud-icons
57 SVG icons for CRUD applications, packaged as a React component with light & dark themes and tooltip.
Stars: ✭ 19 (+46.15%)
Mutual labels:  crud
java-crud-api
No description or website provided.
Stars: ✭ 24 (+84.62%)
Mutual labels:  crud
php-orm-pdo
Micro PHP ORM Library
Stars: ✭ 18 (+38.46%)
Mutual labels:  crud
okta-spring-boot-react-crud-example
Simple CRUD with React and Spring Boot 2.0
Stars: ✭ 214 (+1546.15%)
Mutual labels:  crud
laravel-backpack-crud-extended
This package extends Backpack/CRUD, to add some awesome features!
Stars: ✭ 60 (+361.54%)
Mutual labels:  crud
maricutodb
PHP Flat File Database Manager
Stars: ✭ 23 (+76.92%)
Mutual labels:  crud
ionic4-angular8-crud-mobileapps-example
Ionic 4 Angular 8 Tutorial: Learn to Build CRUD Mobile Apps
Stars: ✭ 20 (+53.85%)
Mutual labels:  crud
ios-grpc-note-crud-app
Swift iOS gRPC Client Note Taking App
Stars: ✭ 16 (+23.08%)
Mutual labels:  crud
BloodMS
🔥 🔥 🔥 A blood management project. 🔥 🔥 🔥
Stars: ✭ 48 (+269.23%)
Mutual labels:  crud

BoilerPlateCommands

Package to generate automatic cruds for Laravel BoilerPlate Apps [Laravel 5 Boilerplate]

The amamarul:crud make:
1 - Model
2 - Model Trait Attribute
3 - Model Trait Relationship
4 - Model Trait Scope
5 - Form Request
6 - Controller
7 - Datatable as Service for Controller
8 - Routes
9 - Breadcrumbs

Install Boilerplate

$ git clone https://github.com/rappasoft/laravel-5-boilerplate.git
$ cd laravel-5-boilerplate
$ composer install

Duplicate .env.example and rename to .env

$ php artisan key:generate

Set Database in .env

Install Package (Laravel)

Via Composer

$ composer require amamarul/boiler-plate-commands

Require Datatables Package

$ composer require yajra/laravel-datatables-buttons:^1.1

Service Provider

Yajra\Datatables\ButtonsServiceProvider::class

Configuration and Assets

$ php artisan vendor:publish --tag=datatables-buttons

Add the following to the AppServiceProvider in the register function:

app/Providers/AppServiceProvider.php

/*
 * Load third party local providers
 */
$this->app->register(\Amamarul\BoilerPlateCommands\Providers\BoilerPlateCommandsServiceProvider::class);

The register function should look like this

public function register()
{
    /*
     * Sets third party service providers that are only needed on local/testing environments
     */
    if ($this->app->environment() == 'local' || $this->app->environment() == 'testing') {
        /**
         * Loader for registering facades.
         */
        $loader = \Illuminate\Foundation\AliasLoader::getInstance();

        /*
         * Load third party local providers
         */
        $this->app->register(\Barryvdh\Debugbar\ServiceProvider::class);

        /*
         * Load third party local aliases
         */
        $loader->alias('Debugbar', \Barryvdh\Debugbar\Facade::class);

        /*
         * Load third party local providers
         */
        $this->app->register(\Amamarul\BoilerPlateCommands\Providers\BoilerPlateCommandsServiceProvider::class);
    }
}

Publish the views

$ php artisan vendor:publish --provider='Amamarul\BoilerPlateCommands\Providers\BoilerPlateCommandsServiceProvider'

Usage

You need the tables migrated

create migration

$ php artisan make:migration create_products_table
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
}

Migrate

$ php artisan migrate

Make the Crud

Run the following commands
amamarul:crud {name} {tabla} {seccion} {grupo?}
* name: Is the Model Name
* tabla: Is the table name
* seccion: can be 'Backend', 'Frontend' or the section you want
* grupo: if you want to group different Models and Controllers like sub sections. this is optional

This is an example for Backend and the group 'Products'. Then you can to add another model/controller in that group

$ php artisan amamarul:crud Product products Backend Products
  • The result in console will be
Model created successfully.
Request created successfully.
TraitAttribute created successfully.
TraitRelationship created successfully.
TraitScope created successfully.
Controller created successfully.
DataTable created successfully.
Routes created successfully.
Breadcrumbs created successfully.
  • Run php artisan serve
$ php artisan serve

Now you can go to http://localhost:8000/admin/products/product and you will show the datatable.

Go to app/Http/Controllers/Backend/Products/DataTables/ProductDataTable.php and uncomment the fields you want to show in the datatable in the getColumns() function (the last function), by default you will see only 'id', 'created_at' and 'updated_at'.

Contributing

Contributions are welcome and will be fully credited.

I accept contributions via Pull Requests

Credits

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].