2017 © Pedro Peláez
 

library base

Laravel wrapper for frequently used package

image

adifaidz/base

Laravel wrapper for frequently used package

  • Tuesday, April 4, 2017
  • by alqaline94
  • Repository
  • 2 Watchers
  • 1 Stars
  • 145 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 20 Versions
  • 0 % Grown

The README.md

Base

Laravel wrapper for commonly used package and crud generators for basic crud functionalities, (*1)

Before you start, read this

  • This package, (*2)

    • Is a Laravel (Currently 5.4) package, (*3)

    • Is still under heavy development :loudspeaker: :construction:, (*4)

    • Uses mainly Laravel, Vue, Bootstrap and Laravel-Mix, (*5)

    • Affects some settings on installation :warning:, (*6)

    • Uses these npm packages:, (*7)

    • admin-lte : ^2.3.8, (*8)

    • axios: ^0.15.2
    • babel-plugin-transform-runtime: ^6.23.0
    • babel-preset-stage-2: ^6.22.0
    • bootstrap-sass: ^3.3.7
    • eonasdan-bootstrap-datetimepicker: ^4.17.43
    • font-awesome: ^4.7.0
    • jquery: ^3.1.0
    • laravel-mix: ^0.8.4
    • lodash: ^4.17.4
    • toastr: ^2.1.2
    • vue: ^2.0.1
    • vue-multiselect: 2.0.0-beta.13
    • vue-resource: ^1.0.3
    • vuetable-2: ^0.9.2

Features

  • Ready to use base functionalities (user profile, login, acl, etc ), (*9)

  • Create crud components (views, controller, routes) based on eloquent model, (*10)

  • Debug using phpdebugbar and logviewer based on your environment, (*11)

  • Clean project using clean, (*12)

  • Easily create menus with laravel-menu, (*13)

Installation

  • Install using composer, (*14)

    composer require adifaidz/base
    
  • Register the service provider to your providers array in config/app.php, (*15)

    AdiFaidz\Base\Providers\BaseServiceProvider::class,
    
  • Run the install command using artisan, this will register guards, providers, password broker, route middlewares and middleware groups. It will also publish vue components, assets and bundling scripts and create route files., (*16)

    php artisan base:install
    
  • Add this to the boot method in app\Providers\AppServiceProvider.php to register all package routes, (*17)

    use AdiFaidz\Base\Base;
    
    ...
    
    Base::routes();
    
  • Change the auth users provider model in config/auth.php to, (*18)

    'users' => [
        'driver' => 'eloquent',
        'model' => AdiFaidz\Base\BaseUser::class,
    ],
    
  • Then, replace the current ExceptionHandler in bootstrap/app.php with Base ExceptionHandler class., (*19)

    $app->singleton(
        Illuminate\Contracts\Debug\ExceptionHandler::class,
        AdiFaidz\Base\Exceptions\Handler::class
    );
    
  • After that, add this to the map method in app\Providers\RouteServiceProvider.php for generated package routes, (*20)

    use AdiFaidz\Base\Base;
    
    ...
    
    Base::mapBaseRoutes();
    
  • Then, configure your database connection and run migrate. Upon completion, tables for users, roles, permissions will be created, (*21)

    php artisan migrate
    
  • Seed the tables, (*22)

    php artisan db:seed --class="AdiFaidz\Base\Seeders\StartupSeeder"
    
  • And finally, run, (*23)

    npm install && npm run watch
    
    or
    
    npm install && npm run dev
    
  • Start up your server and go to, (*24)

    http://localhost/login
    

Todo :computer: :watch:

  • Create form and detail view based on model attributes, (*25)

  • Fallback to [mailtrap][9] in development environment, (*26)

  • Detailed documentation, (*27)

  • Provide better flow, (*28)

The Versions