Download the PHP package elnooronline/laravel-concerns without Composer
On this page you can find all versions of the php package elnooronline/laravel-concerns. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elnooronline/laravel-concerns
More information about elnooronline/laravel-concerns
Files in elnooronline/laravel-concerns
Package laravel-concerns
Short Description The components that make up the Elnooronline's Laravel Projects
License MIT
Informations about the package laravel-concerns
Laravel Concerns
The components that make up the Elnooronline's Laravel Projects.
Install
Configuration
- Import
\Elnooronline\LaravelConcerns\Http\Controllers\Helpers
trait in your base controller class
This feature enables to use flash()
and getResourceName()
methods.
-
flash()
: This method will set flash session with localed message.- example :
getResourceName()
: This method returns the resource name of the specified crud used inController
,Request
,Model
.- example : If you have
UserController
class will returnsusers
. and you can add custom resource name by adding$resourceName
property.
- example : If you have
-
All
Request
classes should extends\Elnooronline\LaravelConcerns\Http\RequestsFormRequest
class.API :
getResourceName()
parseLocale()
- example :
insted of
getAproperRules()
- example :
Filterable
First you should use
Filterable
trait in your model.Then run the following command to generate your filter class.
App\Http\Filters\UserFilter
Now you can use the filter from controller.
Example Url :
/users?type=admin
Eloquent Multiple Auth Provider
You should add 'eloquent.multiple' provider in your
config/auth.php
Add
type
column in users table.In
User
model should add constants of user types.Also you should use
Elnooronline\LaravelConcerns\Models\Concerns\SingleTableInheritance
trait in user model to fill type in creating event.The
Elnooronline\LaravelConcerns\Models\Scopes\UserTypeScope
used to determine the user type when use the model. and should be added to all user type models.Now if your account type is
admin
will returnApp\Models\Admin
instance when you callAuth::user()
insted ofApp\Models\User
.Note : the
App\Models\Admin
model and other type models should extendsApp\Models\User
model.
All versions of laravel-concerns with dependencies
laracasts/flash Version ^3.0
laracasts/presenter Version ^0.2.1
elnooronline/laravel-locales Version ^1.0
ezyang/htmlpurifier Version ^4.10
spatie/laravel-medialibrary Version ^7.12
elnooronline/laravel-bootstrap-forms Version ^2.0