Skip to content

properos/laravel-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Properos Base

Base package with classes (Api, Base, Helper, Paginator, Theme), controllers and views necessarry to start a project.

Register provider on config/app.php

    'providers' => [
        "...",
        Properos\Base\BaseServiceProvider::class,
        "..."
    ],

Run composer dump php artisan vendor:publish Select -> Properos\Base\BaseServiceProvider

Themes It contains a Themes class to allow the use of several themes in the project. The name of theme is declared on env variable "THEME", if this variable isn't declare it going to take a default theme.

Use themes on routers.

    Route::get('/', function () {
        return  view('themes.'.\Properos\Base\Classes\Theme::get().'.index')->with(['theme'=>\Properos\Base\Classes\Theme::get()]);
    });

Create env.js Add on webpack.mix.js .js('resources/assets/js/bootstrap.js', 'public/be/js/core.js') .sass('resources/assets/js/be/sass/app.scss', 'public/be/css')

Add on resources/assets/bootstrap.js

    import Helpers from './misc/helpers'
    window.Helpers = Helpers;

Remove from resources/assets/bootstrap.js

    try {
        window.$ = window.jQuery = require('jquery');

        require('bootstrap');
    } catch (e) {}

Run npm install

Define host, database on .env

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=database_name
    DB_USERNAME=root
    DB_PASSWORD=

Add on app/Providers/AppServiceProvider.php

    use Illuminate\Support\Facades\Schema;
    
    public function boot()
    {
        Schema::defaultStringLength(191);
    }

Run php artisan migrate

About

An amazing toolkit to bootstrap your Laravel project

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •