erikfig/laravel

The Laravel Framework.

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 1

Open Issues: 0

Type:project

dev-master 2017-11-01 00:42 UTC

This package is auto-updated.

Last update: 2024-05-07 15:36:47 UTC


README

68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667

Official skeleton: https://github.com/laravel/laravel

Bake Module

Run:

php artisan bake:module [name]

Run name on plural and lower case, example:

php artisan bake:module pages

Register provider in config/app.php, see command result. Example of command result:

Add this provider to config/app.php:
Modules\Pages\Providers\PageServiceProvider::class,

CrudController and ApiController

Two simple traits to crud on Laravel.

See files in app/Http/Controllers/ApiControllerTrait.php and app/Http/Controllers/CrudControllerTrait.php and example in your Controllers directory on module.

UploadObserverTrait

Example:

<?php

namespace Modules\MyModule\Observers;

use Modules\MyModule\Models\Profile;

class ProfileObserver
{
    use UploadObserverTrait;

    protected $field = 'photo';
    protected $path = 'profile_photos/';

    public function creating(Profile $model)
    {
        $this->sendFile($model);
    }

    public function deleting(Profile $model)
    {
        $this->removeFile($model);
    }

    public function updating(Profile $model)
    {
        $this->updateFile($model);
    }
}

TODO

  • AdminLTE
  • Auth with Email and Socialite
  • CORS package (barryvdh/laravel-cors)
  • OAuth 2 with Passport and Social Networks
  • Enable S3 upload default