Removed unused files. #5
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset emails and
|
||||
| includes a trait which assists in sending these notifications from
|
||||
| your application to your users. Feel free to explore this trait.
|
||||
|
|
||||
*/
|
||||
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Login Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles authenticating users for the application and
|
||||
| redirecting them to your home screen. The controller uses a trait
|
||||
| to conveniently provide its functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
use AuthenticatesUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after login.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest')->except('logout');
|
||||
}
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles the registration of new users as well as their
|
||||
| validation and creation. By default this controller uses a trait to
|
||||
| provide this functionality without requiring any additional code.
|
||||
|
|
||||
*/
|
||||
|
||||
use RegistersUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after registration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a validator for an incoming registration request.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
*/
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make($data, [
|
||||
'username' => 'required|string|max:255',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user instance after a valid registration.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \App\User
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return User::create([
|
||||
'username' => $data['username'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset requests
|
||||
| and uses a simple trait to include this behavior. You're free to
|
||||
| explore this trait and override any methods you wish to tweak.
|
||||
|
|
||||
*/
|
||||
|
||||
use ResetsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users after resetting their password.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Dingo\Api\Routing\Helpers;
|
||||
use Illuminate\Routing\Controller;
|
||||
|
||||
class BaseController extends Controller {
|
||||
use Helpers;
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Tymon\JWTAuth\Exceptions\JWTException;
|
||||
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
|
||||
use Tymon\JWTAuth\Http\Middleware\BaseMiddleware;
|
||||
use Tymon\JWTAuth\Exceptions\TokenExpiredException;
|
||||
|
||||
class RefreshToken extends BaseMiddleware {
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, \Closure $next) {
|
||||
|
||||
$this->checkForToken($request); // Check presence of a token.
|
||||
|
||||
try {
|
||||
if (!$this->auth->parseToken()->authenticate()) { // Check user not found. Check token has expired.
|
||||
throw new UnauthorizedHttpException('jwt-auth', 'User not found');
|
||||
}
|
||||
$payload = $this->auth->manager()->getPayloadFactory()->buildClaimsCollection()->toPlainArray();
|
||||
return $next($request); // Token is valid. User logged. Response without any token.
|
||||
} catch (TokenExpiredException $t) { // Token expired. User not logged.
|
||||
$payload = $this->auth->manager()->getPayloadFactory()->buildClaimsCollection()->toPlainArray();
|
||||
$key = 'block_refresh_token_for_user_' . $payload['sub'];
|
||||
$cachedBefore = (int) Cache::has($key);
|
||||
if ($cachedBefore) { // If a token alredy was refreshed and sent to the client in the last JWT_BLACKLIST_GRACE_PERIOD seconds.
|
||||
\Auth::onceUsingId($payload['sub']); // Log the user using id.
|
||||
return $next($request); // Token expired. Response without any token because in grace period.
|
||||
}
|
||||
try {
|
||||
$newtoken = $this->auth->refresh(); // Get new token.
|
||||
$gracePeriod = $this->auth->manager()->getBlacklist()->getGracePeriod();
|
||||
$expiresAt = Carbon::now()->addSeconds($gracePeriod);
|
||||
Cache::put($key, $newtoken, $expiresAt);
|
||||
} catch (JWTException $e) {
|
||||
throw new UnauthorizedHttpException('jwt-auth', $e->getMessage(), $e, $e->getCode());
|
||||
}
|
||||
}
|
||||
|
||||
$response = $next($request); // Token refreshed and continue.
|
||||
|
||||
return $this->setAuthenticationHeader($response, $newtoken); // Response with new token on header Authorization.
|
||||
}
|
||||
|
||||
}
|
|
@ -1,149 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
use Tymon\JWTAuth\Contracts\JWTSubject;
|
||||
|
||||
/**
|
||||
* Class ForUser
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $username
|
||||
* @property string $password
|
||||
* @property string $salt
|
||||
* @property int $group
|
||||
* @property int $perm_id
|
||||
* @property string $member_title
|
||||
* @property int $permission_id
|
||||
* @property int $total_posts
|
||||
* @property int $total_threads
|
||||
* @property int $reg_date
|
||||
* @property int $last_post_date
|
||||
* @property int $last_post_location
|
||||
* @property string $email
|
||||
* @property string $website_address
|
||||
* @property string $website_name
|
||||
* @property int $gender
|
||||
* @property string $location
|
||||
* @property int $birthday
|
||||
* @property string $bio
|
||||
* @property string $ip_address
|
||||
* @property string $avatar
|
||||
* @property int $ontime
|
||||
* @property int $ostatus
|
||||
* @property string $header
|
||||
* @property string $footer
|
||||
* @property int $strikes
|
||||
* @property string $name_colour
|
||||
* @property int $permission_access
|
||||
* @property string $display_name
|
||||
* @property string $yt_channel
|
||||
* @property string $country
|
||||
* @property int $usr_per_id
|
||||
* @property int $blg_per_id
|
||||
* @property int $for_per_id
|
||||
* @property int $sbx_per_id
|
||||
* @property int $str_per_id
|
||||
* @property int $doc_per_id
|
||||
* @property int $odb_per_id
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class ForUser extends Eloquent
|
||||
{
|
||||
/**
|
||||
* Get the identifier that will be stored in the subject claim of the JWT.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getJWTIdentifier() {
|
||||
return $this->getKey(); // Eloquent Model method
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a key value array, containing any custom claims to be added to the JWT.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getJWTCustomClaims() {
|
||||
return [];
|
||||
}
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'group' => 'int',
|
||||
'perm_id' => 'int',
|
||||
'permission_id' => 'int',
|
||||
'total_posts' => 'int',
|
||||
'total_threads' => 'int',
|
||||
'reg_date' => 'int',
|
||||
'last_post_date' => 'int',
|
||||
'last_post_location' => 'int',
|
||||
'gender' => 'int',
|
||||
'birthday' => 'int',
|
||||
'ontime' => 'int',
|
||||
'ostatus' => 'int',
|
||||
'strikes' => 'int',
|
||||
'permission_access' => 'int',
|
||||
'usr_per_id' => 'int',
|
||||
'blg_per_id' => 'int',
|
||||
'for_per_id' => 'int',
|
||||
'sbx_per_id' => 'int',
|
||||
'str_per_id' => 'int',
|
||||
'doc_per_id' => 'int',
|
||||
'odb_per_id' => 'int'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'salt'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'username',
|
||||
'password',
|
||||
'salt',
|
||||
'group',
|
||||
'perm_id',
|
||||
'member_title',
|
||||
'permission_id',
|
||||
'total_posts',
|
||||
'total_threads',
|
||||
'reg_date',
|
||||
'last_post_date',
|
||||
'last_post_location',
|
||||
'email',
|
||||
'website_address',
|
||||
'website_name',
|
||||
'gender',
|
||||
'location',
|
||||
'birthday',
|
||||
'bio',
|
||||
'ip_address',
|
||||
'avatar',
|
||||
'ontime',
|
||||
'ostatus',
|
||||
'header',
|
||||
'footer',
|
||||
'strikes',
|
||||
'name_colour',
|
||||
'permission_access',
|
||||
'display_name',
|
||||
'yt_channel',
|
||||
'country',
|
||||
'usr_per_id',
|
||||
'blg_per_id',
|
||||
'for_per_id',
|
||||
'sbx_per_id',
|
||||
'str_per_id',
|
||||
'doc_per_id',
|
||||
'odb_per_id'
|
||||
];
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class StrCategory
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $parent_id
|
||||
* @property int $min_screenshots
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class StrCategory extends Eloquent
|
||||
{
|
||||
protected $table = 'str_category';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'int',
|
||||
'min_screenshots' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'parent_id',
|
||||
'min_screenshots'
|
||||
];
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class StrFile
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $file_id
|
||||
* @property string $filename
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class StrFile extends Eloquent
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'file_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'file_id',
|
||||
'filename'
|
||||
];
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class StrOwner
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $file_id
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class StrOwner extends Eloquent
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'file_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'file_id'
|
||||
];
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class StrPermission
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $canview
|
||||
* @property int $upload
|
||||
* @property int $approve
|
||||
* @property int $fail
|
||||
* @property int $delfile
|
||||
* @property int $delscreen
|
||||
* @property int $editfile
|
||||
* @property int $allowfull
|
||||
* @property int $canwarn
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class StrPermission extends Eloquent
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'canview' => 'int',
|
||||
'upload' => 'int',
|
||||
'approve' => 'int',
|
||||
'fail' => 'int',
|
||||
'delfile' => 'int',
|
||||
'delscreen' => 'int',
|
||||
'editfile' => 'int',
|
||||
'allowfull' => 'int',
|
||||
'canwarn' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'canview',
|
||||
'upload',
|
||||
'approve',
|
||||
'fail',
|
||||
'delfile',
|
||||
'delscreen',
|
||||
'editfile',
|
||||
'allowfull',
|
||||
'canwarn'
|
||||
];
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class StrUserPermission
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $canview
|
||||
* @property int $upload
|
||||
* @property int $approve
|
||||
* @property int $fail
|
||||
* @property int $delfile
|
||||
* @property int $delscreen
|
||||
* @property int $editfile
|
||||
* @property int $allowfull
|
||||
* @property int $canwarn
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class StrUserPermission extends Eloquent
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'canview' => 'int',
|
||||
'upload' => 'int',
|
||||
'approve' => 'int',
|
||||
'fail' => 'int',
|
||||
'delfile' => 'int',
|
||||
'delscreen' => 'int',
|
||||
'editfile' => 'int',
|
||||
'allowfull' => 'int',
|
||||
'canwarn' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'canview',
|
||||
'upload',
|
||||
'approve',
|
||||
'fail',
|
||||
'delfile',
|
||||
'delscreen',
|
||||
'editfile',
|
||||
'allowfull',
|
||||
'canwarn'
|
||||
];
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class UsrPermModule
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $root
|
||||
* @property int $banned
|
||||
* @property string $colour_m
|
||||
* @property string $colour_f
|
||||
* @property string $colour_u
|
||||
* @property string $badge
|
||||
* @property int $usr_perm_id
|
||||
* @property int $blg_perm_id
|
||||
* @property int $for_perm_id
|
||||
* @property int $sbx_perm_id
|
||||
* @property int $str_perm_id
|
||||
* @property int $doc_perm_id
|
||||
* @property int $odb_perm_id
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class UsrPermModule extends Eloquent
|
||||
{
|
||||
protected $table = 'usr_perm_module';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'root' => 'int',
|
||||
'banned' => 'int',
|
||||
'usr_perm_id' => 'int',
|
||||
'blg_perm_id' => 'int',
|
||||
'for_perm_id' => 'int',
|
||||
'sbx_perm_id' => 'int',
|
||||
'str_perm_id' => 'int',
|
||||
'doc_perm_id' => 'int',
|
||||
'odb_perm_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'root',
|
||||
'banned',
|
||||
'colour_m',
|
||||
'colour_f',
|
||||
'colour_u',
|
||||
'badge',
|
||||
'usr_perm_id',
|
||||
'blg_perm_id',
|
||||
'for_perm_id',
|
||||
'sbx_perm_id',
|
||||
'str_perm_id',
|
||||
'doc_perm_id',
|
||||
'odb_perm_id'
|
||||
];
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class UsrPermission
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $viewprofile
|
||||
* @property int $editprofile
|
||||
* @property int $delprofile
|
||||
* @property int $postlayout
|
||||
* @property int $namecol
|
||||
* @property int $displayname
|
||||
* @property int $title
|
||||
* @property int $ipshow
|
||||
* @property int $emailshow
|
||||
* @property int $editother
|
||||
* @property int $ban
|
||||
* @property int $setgroup
|
||||
* @property int $setspecial
|
||||
* @property int $settrust
|
||||
* @property int $canpm
|
||||
* @property int $canwarn
|
||||
* @property int $canblock
|
||||
* @property int $ipban
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class UsrPermission extends Eloquent
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'viewprofile' => 'int',
|
||||
'editprofile' => 'int',
|
||||
'delprofile' => 'int',
|
||||
'postlayout' => 'int',
|
||||
'namecol' => 'int',
|
||||
'displayname' => 'int',
|
||||
'title' => 'int',
|
||||
'ipshow' => 'int',
|
||||
'emailshow' => 'int',
|
||||
'editother' => 'int',
|
||||
'ban' => 'int',
|
||||
'setgroup' => 'int',
|
||||
'setspecial' => 'int',
|
||||
'settrust' => 'int',
|
||||
'canpm' => 'int',
|
||||
'canwarn' => 'int',
|
||||
'canblock' => 'int',
|
||||
'ipban' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'viewprofile',
|
||||
'editprofile',
|
||||
'delprofile',
|
||||
'postlayout',
|
||||
'namecol',
|
||||
'displayname',
|
||||
'title',
|
||||
'ipshow',
|
||||
'emailshow',
|
||||
'editother',
|
||||
'ban',
|
||||
'setgroup',
|
||||
'setspecial',
|
||||
'settrust',
|
||||
'canpm',
|
||||
'canwarn',
|
||||
'canblock',
|
||||
'ipban'
|
||||
];
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class UsrUserPermission
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $viewprofile
|
||||
* @property int $editprofile
|
||||
* @property int $delprofile
|
||||
* @property int $postlayout
|
||||
* @property int $namecol
|
||||
* @property int $displayname
|
||||
* @property int $title
|
||||
* @property int $ipshow
|
||||
* @property int $emailshow
|
||||
* @property int $editother
|
||||
* @property int $ban
|
||||
* @property int $setgroup
|
||||
* @property int $setspecial
|
||||
* @property int $settrust
|
||||
* @property int $canpm
|
||||
* @property int $canwarn
|
||||
* @property int $canblock
|
||||
* @property int $ipban
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class UsrUserPermission extends Eloquent
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'viewprofile' => 'int',
|
||||
'editprofile' => 'int',
|
||||
'delprofile' => 'int',
|
||||
'postlayout' => 'int',
|
||||
'namecol' => 'int',
|
||||
'displayname' => 'int',
|
||||
'title' => 'int',
|
||||
'ipshow' => 'int',
|
||||
'emailshow' => 'int',
|
||||
'editother' => 'int',
|
||||
'ban' => 'int',
|
||||
'setgroup' => 'int',
|
||||
'setspecial' => 'int',
|
||||
'settrust' => 'int',
|
||||
'canpm' => 'int',
|
||||
'canwarn' => 'int',
|
||||
'canblock' => 'int',
|
||||
'ipban' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'viewprofile',
|
||||
'editprofile',
|
||||
'delprofile',
|
||||
'postlayout',
|
||||
'namecol',
|
||||
'displayname',
|
||||
'title',
|
||||
'ipshow',
|
||||
'emailshow',
|
||||
'editother',
|
||||
'ban',
|
||||
'setgroup',
|
||||
'setspecial',
|
||||
'settrust',
|
||||
'canpm',
|
||||
'canwarn',
|
||||
'canblock',
|
||||
'ipban'
|
||||
];
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Transformers;
|
||||
|
||||
use App\User;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class UsersTransformer extends TransformerAbstract {
|
||||
public function transform(User $user) {
|
||||
return [
|
||||
'id' => $user->id,
|
||||
'username' => $user->username
|
||||
];
|
||||
}
|
||||
}
|
新しいイシューから参照