PHP code example of erenmustafaozdal / laravel-user-module
1. Go to this page and download the library: Download erenmustafaozdal/laravel-user-module library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
erenmustafaozdal / laravel-user-module example snippets
ErenMustafaOzdal\LaravelUserModule\LaravelUserModuleServiceProvider::class,
$table->string('last_name')->nullable(); // bu satırdan sonra
$table->boolean('is_active')->default(0); // bu satırı eklemelisin
$table->boolean('is_super_admin')->default(0); // bu satırı da eklemelisin
$table->string('photo')->nullable(); // ve arkasından bu satırı
protected $subscribe = [
'ErenMustafaOzdal\LaravelUserModule\Listeners\LaravelUserModuleListener',
];
'users' => [
'model' => 'App\User',
],
'roles' => [
'model' => 'App\Role',
],
namespace App;
use ErenMustafaOzdal\LaravelUserModule\User as EMOUser;
class User extends EMOUser
{
//
}
namespace App;
use ErenMustafaOzdal\LaravelUserModule\Role as EMORole;
class Role extends EMORole
{
//
}
public function rules()
{
return [
'first_name' => ' => 'ms' => '
public function rules()
{
return [
'email' => '
public function rules()
{
return [
'email' => '
public function rules()
{
return [
'email' => '
}
public function rules()
{
return [
'first_name' => ' => 'to' => 'max:5120|image|mimes:jpeg,jpg,png',
'x' => 'integer',
'y' => 'integer',
'width' => 'integer',
'height' => 'integer',
'permissions' => 'array',
];
}
public function rules()
{
return [
'first_name' => ' => 'email|max:255|unique:users,slug,'.$this->segment(3),
'password' => 'confirmed|min:6|max:255',
'photo' => 'max:5120|image|mimes:jpeg,jpg,png',
'x' => 'integer',
'y' => 'integer',
'width' => 'integer',
'height' => 'integer',
'permissions' => 'array',
];
}
public function rules()
{
return [
'password' => '
public function rules()
{
return [
'permissions' => 'array'
];
}
public function rules()
{
return [
'photo' => '',
'width' => 'integer',
'height' => 'integer',
];
}
public function rules()
{
return [
'name' => ' 'permissions' => 'array',
];
}
public function rules()
{
return [
'name' => 'max:255',
'slug' => 'alpha_dash|max:255|unique:roles,slug,'.$this->segment(3),
'permissions' => 'array',
];
}
@inject('permission', 'ErenMustafaOzdal\LaravelUserModule\Services\PermissionService')
<ul>
@foreach($permission->groupByController() as $namespace => $routes)
<li>
<span class="route-name">{!! $route['route'] !!}</span>
{!! Form::checkbox( "permissions[{$route['route']}]", true, isset($permissions[$route['route']]) ) !!}
</li>
@endforeach
</ul>
bash
php artisan vendor:publish --provider="ErenMustafaOzdal\LaravelUserModule\LaravelUserModuleServiceProvider"
bash
php artisan migrate