mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 04:24:01 +00:00
add migration
This commit is contained in:
@@ -0,0 +1 @@
|
||||
vendor
|
||||
@@ -6,6 +6,7 @@
|
||||
/.idea
|
||||
/.vscode
|
||||
/.vagrant
|
||||
/data
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
|
||||
+5
-4
@@ -1,9 +1,10 @@
|
||||
FROM php:7
|
||||
RUN apt-get update -y && apt-get install -y openssl zip unzip git
|
||||
RUN apt-get update -y && apt-get install -y openssl zip unzip git netcat libpng-dev
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
RUN docker-php-ext-install pdo pdo_mysql
|
||||
RUN docker-php-ext-install gd
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN composer install
|
||||
CMD php artisan serve --host=0.0.0.0 --port=8000
|
||||
EXPOSE 8000
|
||||
RUN composer update
|
||||
ADD start.sh /start.sh
|
||||
CMD ["/start.sh"]
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Company extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = ['user_id', 'company_profile', 'reg_cert', 'company_name', 'registration_no', 'tax_no', 'tel_no', 'fax', 'address', 'city', 'postcode', 'state', 'country', 'contact_person'];
|
||||
//protected $guarded = [];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\User');
|
||||
}
|
||||
}
|
||||
@@ -2,47 +2,165 @@
|
||||
namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use App\User;
|
||||
use App\UserVerification;
|
||||
use App\PasswordResets;
|
||||
use JWTAuth;
|
||||
use Auth;
|
||||
use App\Role;
|
||||
use App\Company;
|
||||
|
||||
use Aloha\Twilio\Twilio;
|
||||
use Tymon\JWTAuth\Exceptions\JWTException;
|
||||
use Validator, DB, Hash, Mail, Illuminate\Support\Facades\Password;
|
||||
use Illuminate\Auth\Passwords\TokenRepositoryInterface;
|
||||
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
protected $hasher;
|
||||
public function __construct(HasherContract $hasher)
|
||||
{
|
||||
$this->hasher = $hasher;
|
||||
}
|
||||
/**
|
||||
* API Send verification code
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function sendVerification(Request $request){
|
||||
$credentials = $request->only('phone');
|
||||
$rules = [
|
||||
'phone' => 'required|digits_between:10,11|unique:users'
|
||||
];
|
||||
$validator = Validator::make($credentials, $rules);
|
||||
|
||||
if($validator->fails()){
|
||||
return response()->json(['success'=> false, 'message'=> 'The minimum length should be 10.' ], 400);
|
||||
}
|
||||
|
||||
// create user if not exist
|
||||
$user = User::firstOrNew([
|
||||
'phone' => $request->phone
|
||||
]);
|
||||
$user->save();
|
||||
|
||||
// create token if not exist, update if exist
|
||||
$token = mt_rand(0000,9999);
|
||||
|
||||
// for testing
|
||||
if($request->phone == '0123456789'){
|
||||
$token = "1234";
|
||||
}
|
||||
|
||||
$user_verification = $user->phoneVerification()->firstOrNew([
|
||||
'user_id' => $user->id,
|
||||
]);
|
||||
$user_verification->token = $token;
|
||||
$user_verification->save();
|
||||
|
||||
// TODO: send token to phone
|
||||
//$message = "RM0.00 IZYIM: Verification code : ". $token;
|
||||
//$twilio = new Twilio(env('TWILIO_ACC'), env('TWILIO_TOKEN'), env('TWILIO_NUMBER'));
|
||||
//$twilio->message($request->phone, $message);
|
||||
return response()->json(['success'=> true, 'message'=> 'A verification code has been send to your mobile number.' ], 200);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* API Verify User
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function verifyPhone(Request $request)
|
||||
{
|
||||
$credentials = $request->only('phone', 'token');
|
||||
|
||||
// check if user already verified
|
||||
$check_user = User::where('phone', $request->phone)->first();
|
||||
if(!is_null($check_user)){
|
||||
if($check_user->is_verified == 1){
|
||||
return response()->json([
|
||||
'success'=> true,
|
||||
'message'=> 'Account already verified.'
|
||||
], 200);
|
||||
}
|
||||
}
|
||||
else{
|
||||
return response()->json([
|
||||
'success'=> false,
|
||||
'message'=> 'Please contact support.'
|
||||
], 400);
|
||||
}
|
||||
|
||||
// check and verify valid token
|
||||
$check_token = $check_user->phoneVerification()->where('token', $request->token)->first();
|
||||
if(!is_null($check_token)){
|
||||
$check_user->is_verified = 1;
|
||||
$check_user->save();
|
||||
$check_token->delete();
|
||||
|
||||
if (!$userToken=JWTAuth::fromUser($check_user)) {
|
||||
return response()->json(['error' => 'invalid_credentials'], 401);
|
||||
}
|
||||
|
||||
// TODO : Create company for user
|
||||
|
||||
|
||||
$expiration = JWTAuth::setToken($userToken)->getPayload()->get('exp');
|
||||
// all good so return the token
|
||||
return response()->json(['success' => true, 'token' => $userToken,
|
||||
'token_type' => 'bearer',
|
||||
'expires_in' => $expiration - time()]);
|
||||
}
|
||||
return response()->json(['success'=> false, 'error'=> "Verification code is invalid."], 400);
|
||||
}
|
||||
|
||||
/**
|
||||
* API Register
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function register(Request $request)
|
||||
public function updateUser(Request $request)
|
||||
{
|
||||
$credentials = $request->only('name', 'email', 'password');
|
||||
|
||||
$credentials = $request->only('role', 'name', 'password', 'password_confirmation');
|
||||
|
||||
$rules = [
|
||||
'name' => 'required|max:255',
|
||||
'email' => 'required|email|max:255|unique:users'
|
||||
'role' => 'required',
|
||||
'password' => 'required|confirmed|min:6'
|
||||
];
|
||||
|
||||
$validator = Validator::make($credentials, $rules);
|
||||
if($validator->fails()) {
|
||||
return response()->json(['success'=> false, 'error'=> $validator->messages()]);
|
||||
return response()->json(['success'=> false, 'error'=> $validator->messages()], 400);
|
||||
}
|
||||
|
||||
$name = $request->name;
|
||||
$email = $request->email;
|
||||
$password = $request->password;
|
||||
|
||||
$user = User::create(['name' => $name, 'email' => $email, 'password' => Hash::make($password)]);
|
||||
$verification_code = str_random(30); //Generate verification code
|
||||
DB::table('user_verifications')->insert(['user_id'=>$user->id,'token'=>$verification_code]);
|
||||
$subject = "Please verify your email address.";
|
||||
Mail::send('email.verify', ['name' => $name, 'verification_code' => $verification_code],
|
||||
function($mail) use ($email, $name, $subject){
|
||||
$mail->from(getenv('FROM_EMAIL_ADDRESS'), "From User/Company Name Goes Here");
|
||||
$mail->to($email, $name);
|
||||
$mail->subject($subject);
|
||||
});
|
||||
return response()->json(['success'=> true, 'message'=> 'Thanks for signing up! Please check your email to complete your registration.']);
|
||||
$role = $request->role;
|
||||
|
||||
// find role
|
||||
$role = Role::where('name','=',$role)->first();
|
||||
|
||||
$user = Auth::user();
|
||||
|
||||
// attach role to user
|
||||
$user->attachRole($role);
|
||||
$user->update(['name' => $name, 'password' => Hash::make($password)]);
|
||||
|
||||
// TODO : create company for user
|
||||
$company = new Company;
|
||||
$company->user_id = $user->id;
|
||||
$company->save();
|
||||
|
||||
|
||||
return response()->json(['success'=> true, 'message'=> 'Profile updated.'], 200);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* API Login, on success return JWT Auth token
|
||||
*
|
||||
@@ -51,23 +169,23 @@ class AuthController extends Controller
|
||||
*/
|
||||
public function login(Request $request)
|
||||
{
|
||||
$credentials = $request->only('email', 'password');
|
||||
|
||||
$credentials = $request->only('phone', 'password');
|
||||
|
||||
$rules = [
|
||||
'email' => 'required|email',
|
||||
'phone' => 'required|digits:11',
|
||||
'password' => 'required',
|
||||
];
|
||||
$validator = Validator::make($credentials, $rules);
|
||||
if($validator->fails()) {
|
||||
return response()->json(['success'=> false, 'error'=> $validator->messages()]);
|
||||
}
|
||||
|
||||
|
||||
$credentials['is_verified'] = 1;
|
||||
|
||||
|
||||
try {
|
||||
// attempt to verify the credentials and create a token for the user
|
||||
if (! $token = JWTAuth::attempt($credentials)) {
|
||||
return response()->json(['success' => false, 'error' => 'We cant find an account with this credentials. Please make sure you entered the right information and you have verified your email address.'], 401);
|
||||
return response()->json(['success' => false, 'error' => 'Phone or password incorrect'], 401);
|
||||
}
|
||||
} catch (JWTException $e) {
|
||||
// something went wrong whilst attempting to encode the token
|
||||
@@ -86,7 +204,7 @@ class AuthController extends Controller
|
||||
*/
|
||||
public function logout(Request $request) {
|
||||
$this->validate($request, ['token' => 'required']);
|
||||
|
||||
|
||||
try {
|
||||
JWTAuth::invalidate($request->input('token'));
|
||||
return response()->json(['success' => true, 'message'=> "You have successfully logged out."]);
|
||||
@@ -104,50 +222,76 @@ class AuthController extends Controller
|
||||
*/
|
||||
public function recover(Request $request)
|
||||
{
|
||||
$user = User::where('email', $request->email)->first();
|
||||
if (!$user) {
|
||||
$error_message = "Your email address was not found.";
|
||||
return response()->json(['success' => false, 'error' => ['email'=> $error_message]], 401);
|
||||
|
||||
$credentials = $request->only('phone');
|
||||
|
||||
$rules = [
|
||||
'phone'=> 'required',
|
||||
];
|
||||
|
||||
$validator = Validator::make($credentials, $rules);
|
||||
if($validator->fails()) {
|
||||
return response()->json(['success'=> false, 'error'=> $validator->messages()]);
|
||||
}
|
||||
try {
|
||||
Password::sendResetLink($request->only('email'), function (Message $message) {
|
||||
$message->subject('Your Password Reset Link');
|
||||
});
|
||||
} catch (\Exception $e) {
|
||||
//Return with error
|
||||
$error_message = $e->getMessage();
|
||||
return response()->json(['success' => false, 'error' => $error_message], 401);
|
||||
|
||||
$user = User::where('phone', $request->phone)->first();
|
||||
|
||||
if ($user){
|
||||
$token = str_random(64);
|
||||
DB::table(config('auth.passwords.users.table'))->insert([
|
||||
'phone' => $user->phone,
|
||||
'token' => $token
|
||||
]);
|
||||
return response()->json([
|
||||
'success' => true, 'data'=> ['message'=> 'A reset link has been send to your mobile phone.']
|
||||
]);
|
||||
}
|
||||
|
||||
/*
|
||||
todo
|
||||
|
||||
send SMS
|
||||
*/
|
||||
|
||||
return response()->json([
|
||||
'success' => true, 'data'=> ['message'=> 'A reset email has been sent! Please check your email.']
|
||||
'success' => false, 'data'=> ['message'=> 'Fail to recover your account.']
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* API Verify User
|
||||
* Reset the given user's password.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function verifyUser($verification_code)
|
||||
public function reset(Request $request)
|
||||
{
|
||||
$check = DB::table('user_verifications')->where('token',$verification_code)->first();
|
||||
if(!is_null($check)){
|
||||
$user = User::find($check->user_id);
|
||||
if($user->is_verified == 1){
|
||||
return response()->json([
|
||||
'success'=> true,
|
||||
'message'=> 'Account already verified..'
|
||||
]);
|
||||
}
|
||||
$user->update(['is_verified' => 1]);
|
||||
DB::table('user_verifications')->where('token',$verification_code)->delete();
|
||||
|
||||
$credentials = $request->only('token', 'password', 'password_confirmation');
|
||||
|
||||
$rules = [
|
||||
'token' => 'required',
|
||||
'password' => 'required|confirmed|min:6'
|
||||
];
|
||||
|
||||
$validator = Validator::make($credentials, $rules);
|
||||
if($validator->fails()) {
|
||||
return response()->json(['success'=> false, 'error'=> $validator->messages()]);
|
||||
}
|
||||
$token = $request->get('token');
|
||||
$password = $request->get('password');
|
||||
$reset = PasswordResets::where('token', $token)->first();
|
||||
if($reset) {
|
||||
$user = User::where('phone', '=', $reset->phone)->first();
|
||||
$user->password = Hash::make($password);
|
||||
$user->save();
|
||||
$reset->delete();
|
||||
return response()->json([
|
||||
'success'=> true,
|
||||
'message'=> 'You have successfully verified your email address.'
|
||||
'success' => false, 'data'=> ['message'=> 'Reset success']
|
||||
]);
|
||||
}
|
||||
return response()->json(['success'=> false, 'error'=> "Verification code is invalid."]);
|
||||
return response()->json([
|
||||
'success' => false, 'data'=> ['message'=> 'Invalid token or email or expired code']
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Company;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Validator;
|
||||
use Auth;
|
||||
|
||||
class CompanyController extends Controller
|
||||
{
|
||||
public function update(Request $request)
|
||||
{
|
||||
$company = Company::where("user_id", Auth::user()->id)->first();
|
||||
if (!$company)
|
||||
{
|
||||
return response()->json(['success'=> false, 'message'=>'Company not found'], 404);
|
||||
}
|
||||
|
||||
$rules = [
|
||||
'company_name' => 'required',
|
||||
'registration_no' => 'required',
|
||||
'tax_no' => 'required',
|
||||
'tax_no' => 'required',
|
||||
'tel_no' => 'required',
|
||||
'fax' => 'required',
|
||||
'address' => 'required',
|
||||
'city' => 'required',
|
||||
'postcode' => 'required',
|
||||
'state' => 'required',
|
||||
'country' => 'required',
|
||||
'contact_person' => 'required'
|
||||
];
|
||||
|
||||
$validator = Validator::make($request->all(), $rules);
|
||||
if($validator->fails()) {
|
||||
return response()->json(['success'=> false, 'error'=> 'All the fields are required'], 400);
|
||||
//return response()->json(['success'=> false, 'error'=> $validator->messages()], 400);
|
||||
}
|
||||
|
||||
$company->company_name=$request->input('company_name');
|
||||
$company->registration_no=$request->input('registration_no');
|
||||
$company->tax_no=$request->input('tax_no');
|
||||
$company->tel_no=$request->input('tel_no');
|
||||
$company->fax=$request->input('fax');
|
||||
$company->address=$request->input('address');
|
||||
$company->city=$request->input('city');
|
||||
$company->postcode=$request->input('postcode');
|
||||
$company->state=$request->input('state');
|
||||
$company->country=$request->input('country');
|
||||
$company->contact_person=$request->input('contact_person');
|
||||
|
||||
$company->save();
|
||||
return response()->json(['success'=> true, 'message'=>'Company created successfully'],200);
|
||||
}
|
||||
|
||||
public function companyProfile(Request $request)
|
||||
{
|
||||
$company = Company::where("user_id", Auth::user()->id)->first();
|
||||
if (!$company)
|
||||
{
|
||||
return response()->json(['success'=> false, 'error'=>'Company not found'], 404);
|
||||
}
|
||||
//validaating file types
|
||||
$validator = Validator::make($request->all(), [
|
||||
'company_profile' => 'image|mimes:jpg,jpeg,bmp,png'
|
||||
]);
|
||||
if($validator->fails())
|
||||
{
|
||||
return response()->json(['success'=> false, 'error'=>'Incorrect format'], 400);
|
||||
}
|
||||
|
||||
if($file = $request->file('company_profile')) //company profile picture
|
||||
{
|
||||
$company_profile = $request->file('company_profile');
|
||||
$filename = $company_profile->getClientOriginalName(); //get the original file name
|
||||
$unique_name = 'comp_prof_' . md5($filename. time()); //generating a random file name
|
||||
|
||||
$file = $request->file('company_profile');
|
||||
$ext = $file->getClientOriginalExtension();
|
||||
$input['company_profile'] = $filename;
|
||||
Storage::putFileAs(
|
||||
'company_profile',/*folder name*/ $file, $unique_name. '.' .$ext
|
||||
);
|
||||
$company->company_profile = $unique_name. '.' .$ext; //update database
|
||||
} //end if
|
||||
$company->save();
|
||||
return response()->json(['success'=> true, 'message'=>'Company profile picture uploaded successfully'],200);
|
||||
}//end of companyProfile()
|
||||
|
||||
public function regCert(Request $request)
|
||||
{
|
||||
$company = Company::where("user_id", Auth::user()->id)->first();
|
||||
if (!$company)
|
||||
{
|
||||
return response()->json(['success'=> false, 'error'=>'Company not found'], 404);
|
||||
}
|
||||
|
||||
//validating file types
|
||||
$validator = Validator::make($request->all(), [
|
||||
'reg_cert' => 'mimes:jpg,jpeg,bmp,png,gif,svg,pdf'
|
||||
]);
|
||||
if($validator->fails()){
|
||||
return response()->json(['success'=> false, 'error'=>'Incorrect format'], 400);
|
||||
}
|
||||
|
||||
if($request->hasFile('reg_cert')) //Registration Certificate upload
|
||||
{
|
||||
$reg_cert = $request->file('reg_cert');
|
||||
$filename = $reg_cert->getClientOriginalName(); //original filename
|
||||
$unique_name = 'reg_cert_' . md5($filename. time()); //generating a random file name
|
||||
|
||||
$file = $request->file('reg_cert');
|
||||
$ext = $file->getClientOriginalExtension();
|
||||
$input['reg_cert'] = $filename;
|
||||
Storage::putFileAs(
|
||||
'reg_cert',/*folder name*/ $file, $unique_name. '.' .$ext
|
||||
);
|
||||
$company->reg_cert = $unique_name. '.' .$ext; //this updates database
|
||||
}//end if
|
||||
$company->save();
|
||||
return response()->json(['success'=> true, 'message'=>'Registration Certificate uploaded successfully'], 200);
|
||||
}//end regCert()
|
||||
|
||||
}//end of class
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
+2
-2
@@ -59,7 +59,7 @@ class Kernel extends HttpKernel
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'jwt.auth' => 'Tymon\JWTAuth\Middleware\GetUserFromToken',
|
||||
'jwt.refresh' => 'Tymon\JWTAuth\Middleware\RefreshToken',
|
||||
'jwt.auth' => \Tymon\JWTAuth\Http\Middleware\Authenticate::class,
|
||||
'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PasswordResets extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Laratrust\Models\LaratrustPermission;
|
||||
|
||||
class Permission extends LaratrustPermission
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Laratrust\Models\LaratrustRole;
|
||||
|
||||
class Role extends LaratrustRole
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Laratrust\Models\LaratrustTeam;
|
||||
|
||||
class Team extends LaratrustTeam
|
||||
{
|
||||
}
|
||||
+13
-1
@@ -5,9 +5,11 @@ namespace App;
|
||||
use Tymon\JWTAuth\Contracts\JWTSubject;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Laratrust\Traits\LaratrustUserTrait;
|
||||
|
||||
class User extends Authenticatable implements JWTSubject
|
||||
{
|
||||
use LaratrustUserTrait;
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
@@ -16,7 +18,7 @@ class User extends Authenticatable implements JWTSubject
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email', 'password',
|
||||
'name', 'phone', 'password'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -47,4 +49,14 @@ class User extends Authenticatable implements JWTSubject
|
||||
return [];
|
||||
}
|
||||
|
||||
public function phoneVerification()
|
||||
{
|
||||
return $this->hasOne('App\UserVerification', 'user_id');
|
||||
}
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->hasOne('App\Company');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserVerification extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'token'
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\User', 'user_id');
|
||||
}
|
||||
|
||||
}
|
||||
+6
-1
@@ -6,10 +6,15 @@
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"aloha/twilio": "^4.0",
|
||||
"doctrine/dbal": "~2.3",
|
||||
"fideloper/proxy": "^4.0",
|
||||
"intervention/image": "^2.4",
|
||||
"laravel/framework": "5.6.*",
|
||||
"laravel/tinker": "^1.0",
|
||||
"tymon/jwt-auth": "dev-develop"
|
||||
"santigarcor/laratrust": "5.0.*",
|
||||
"tymon/jwt-auth": "1.0.*",
|
||||
"zizaco/entrust": "5.2.x-dev"
|
||||
},
|
||||
"require-dev": {
|
||||
"filp/whoops": "^2.0",
|
||||
|
||||
Generated
+843
-9
@@ -4,8 +4,72 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f2d9e6ec1c09918f1f3130aa31e04472",
|
||||
"content-hash": "cede893a42c764bea70b46adc91247ad",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aloha/twilio",
|
||||
"version": "4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aloha/laravel-twilio.git",
|
||||
"reference": "0fd74d541116b0641f815bb59b8323cfe1d6004f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aloha/laravel-twilio/zipball/0fd74d541116b0641f815bb59b8323cfe1d6004f",
|
||||
"reference": "0fd74d541116b0641f815bb59b8323cfe1d6004f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.0",
|
||||
"twilio/sdk": "5.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^1.9",
|
||||
"illuminate/console": "~4||~5",
|
||||
"illuminate/support": "~4||~5",
|
||||
"phpunit/phpunit": "~4.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Aloha\\Twilio\\Support\\Laravel\\ServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Twilio": "Aloha\\Twilio\\Support\\Laravel\\Facade"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Aloha\\Twilio\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hannes Van De Vreken",
|
||||
"email": "vandevreken.hannes@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Travis J Ryan",
|
||||
"email": "travisjryan@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Twilio API for Laravel",
|
||||
"homepage": "https://github.com/aloha/laravel-twilio",
|
||||
"keywords": [
|
||||
"ivr",
|
||||
"laravel",
|
||||
"sms",
|
||||
"twilio"
|
||||
],
|
||||
"time": "2018-04-23T14:59:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dnoegel/php-xdg-base-dir",
|
||||
"version": "0.1",
|
||||
@@ -39,6 +103,363 @@
|
||||
"description": "implementation of xdg base directory specification for php",
|
||||
"time": "2014-10-24T07:27:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
"version": "v1.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/annotations.git",
|
||||
"reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5",
|
||||
"reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/lexer": "1.*",
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/cache": "1.*",
|
||||
"phpunit/phpunit": "^6.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.6.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Docblock Annotations Parser",
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"keywords": [
|
||||
"annotations",
|
||||
"docblock",
|
||||
"parser"
|
||||
],
|
||||
"time": "2017-12-06T07:11:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/cache",
|
||||
"version": "v1.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/cache.git",
|
||||
"reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/cache/zipball/b3217d58609e9c8e661cd41357a54d926c4a2a1a",
|
||||
"reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "~7.1"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/common": ">2.2,<2.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"alcaeus/mongo-php-adapter": "^1.1",
|
||||
"mongodb/mongodb": "^1.1",
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"predis/predis": "~1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Caching library offering an object-oriented API for many cache backends",
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"keywords": [
|
||||
"cache",
|
||||
"caching"
|
||||
],
|
||||
"time": "2017-08-25T07:02:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/collections",
|
||||
"version": "v1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/collections.git",
|
||||
"reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf",
|
||||
"reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "~0.1@dev",
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Doctrine\\Common\\Collections\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Collections Abstraction library",
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"keywords": [
|
||||
"array",
|
||||
"collections",
|
||||
"iterator"
|
||||
],
|
||||
"time": "2017-07-22T10:37:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/common",
|
||||
"version": "v2.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/common.git",
|
||||
"reference": "f68c297ce6455e8fd794aa8ffaf9fa458f6ade66"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/common/zipball/f68c297ce6455e8fd794aa8ffaf9fa458f6ade66",
|
||||
"reference": "f68c297ce6455e8fd794aa8ffaf9fa458f6ade66",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/annotations": "1.*",
|
||||
"doctrine/cache": "1.*",
|
||||
"doctrine/collections": "1.*",
|
||||
"doctrine/inflector": "1.*",
|
||||
"doctrine/lexer": "1.*",
|
||||
"php": "~7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Common\\": "lib/Doctrine/Common"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Common Library for Doctrine projects",
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"keywords": [
|
||||
"annotations",
|
||||
"collections",
|
||||
"eventmanager",
|
||||
"persistence",
|
||||
"spl"
|
||||
],
|
||||
"time": "2017-08-31T08:43:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/dbal",
|
||||
"version": "v2.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/dbal.git",
|
||||
"reference": "11037b4352c008373561dc6fc836834eed80c3b5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/11037b4352c008373561dc6fc836834eed80c3b5",
|
||||
"reference": "11037b4352c008373561dc6fc836834eed80c3b5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/common": "^2.7.1",
|
||||
"ext-pdo": "*",
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^4.0",
|
||||
"phpunit/phpunit": "^7.0",
|
||||
"phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5",
|
||||
"symfony/console": "^2.0.5||^3.0",
|
||||
"symfony/phpunit-bridge": "^3.4.5|^4.0.5"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/console": "For helpful console commands such as SQL execution and import of files."
|
||||
},
|
||||
"bin": [
|
||||
"bin/doctrine-dbal"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.7.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Doctrine\\DBAL\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Database Abstraction Layer",
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"keywords": [
|
||||
"database",
|
||||
"dbal",
|
||||
"persistence",
|
||||
"queryobject"
|
||||
],
|
||||
"time": "2018-04-07T18:44:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/inflector",
|
||||
"version": "v1.3.0",
|
||||
@@ -366,6 +787,141 @@
|
||||
],
|
||||
"time": "2018-02-07T20:20:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Psr7\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "PSR-7 message implementation that also provides common utility methods",
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"request",
|
||||
"response",
|
||||
"stream",
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2017-03-20T17:10:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "intervention/image",
|
||||
"version": "2.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Intervention/image.git",
|
||||
"reference": "3603dbcc9a17d307533473246a6c58c31cf17919"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Intervention/image/zipball/3603dbcc9a17d307533473246a6c58c31cf17919",
|
||||
"reference": "3603dbcc9a17d307533473246a6c58c31cf17919",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"guzzlehttp/psr7": "~1.1",
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "~0.9.2",
|
||||
"phpunit/phpunit": "^4.8 || ^5.7"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gd": "to use GD library based image processing.",
|
||||
"ext-imagick": "to use Imagick based image processing.",
|
||||
"intervention/imagecache": "Caching extension for the Intervention Image library"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Intervention\\Image\\ImageServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Image": "Intervention\\Image\\Facades\\Image"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Intervention\\Image\\": "src/Intervention/Image"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Oliver Vogel",
|
||||
"email": "oliver@olivervogel.com",
|
||||
"homepage": "http://olivervogel.com/"
|
||||
}
|
||||
],
|
||||
"description": "Image handling and manipulation library with support for Laravel integration",
|
||||
"homepage": "http://image.intervention.io/",
|
||||
"keywords": [
|
||||
"gd",
|
||||
"image",
|
||||
"imagick",
|
||||
"laravel",
|
||||
"thumbnail",
|
||||
"watermark"
|
||||
],
|
||||
"time": "2017-09-21T16:29:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jakub-onderka/php-console-color",
|
||||
"version": "0.1",
|
||||
@@ -453,6 +1009,51 @@
|
||||
],
|
||||
"time": "2015-04-20T18:58:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kkszymanowski/traitor",
|
||||
"version": "0.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/KKSzymanowski/Traitor.git",
|
||||
"reference": "9770fc7de72ff585601dc9c42b31715d9fc40a24"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/KKSzymanowski/Traitor/zipball/9770fc7de72ff585601dc9c42b31715d9fc40a24",
|
||||
"reference": "9770fc7de72ff585601dc9c42b31715d9fc40a24",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"nikic/php-parser": "^1.0|^2.0|^3.0|^4.0",
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.1"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Traitor\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kuba Szymanowski",
|
||||
"email": "kuba.szymanowski@inf24.pl"
|
||||
}
|
||||
],
|
||||
"description": "Add a trait use statement to existing PHP class",
|
||||
"keywords": [
|
||||
"add",
|
||||
"php",
|
||||
"trait"
|
||||
],
|
||||
"time": "2018-04-19T12:24:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.6.17",
|
||||
@@ -1139,6 +1740,56 @@
|
||||
],
|
||||
"time": "2017-02-14T16:28:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-message.git",
|
||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
|
||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Message\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP messages",
|
||||
"homepage": "https://github.com/php-fig/http-message",
|
||||
"keywords": [
|
||||
"http",
|
||||
"http-message",
|
||||
"psr",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"time": "2016-08-06T14:39:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.2",
|
||||
@@ -1386,6 +2037,75 @@
|
||||
],
|
||||
"time": "2018-01-20T00:28:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "santigarcor/laratrust",
|
||||
"version": "5.0.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/santigarcor/laratrust.git",
|
||||
"reference": "526cc3e8970c35b97c71a7a6d8b63c2073568bb1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/santigarcor/laratrust/zipball/526cc3e8970c35b97c71a7a6d8b63c2073568bb1",
|
||||
"reference": "526cc3e8970c35b97c71a7a6d8b63c2073568bb1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/auth": "~5.2",
|
||||
"illuminate/cache": "~5.2",
|
||||
"illuminate/console": "~5.2",
|
||||
"illuminate/database": "^5.2.32",
|
||||
"illuminate/support": "~5.2",
|
||||
"kkszymanowski/traitor": "^0.2.0",
|
||||
"php": ">=5.5.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": ">=0.9.9",
|
||||
"orchestra/testbench": "~3.2",
|
||||
"phpunit/phpunit": ">=4.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Laratrust\\LaratrustServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Laratrust": "Laratrust\\LaratrustFacade"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laratrust\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Santiago Garcia",
|
||||
"homepage": "http://santigarcor.me"
|
||||
}
|
||||
],
|
||||
"description": "This package provides a flexible way to add Role-based Permissions to Laravel",
|
||||
"keywords": [
|
||||
"Teams",
|
||||
"acl",
|
||||
"authorization",
|
||||
"laratrust",
|
||||
"laravel",
|
||||
"multiusers",
|
||||
"permissions",
|
||||
"php",
|
||||
"rbac",
|
||||
"roles"
|
||||
],
|
||||
"time": "2018-03-05T13:21:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "swiftmailer/swiftmailer",
|
||||
"version": "v6.0.2",
|
||||
@@ -2403,17 +3123,63 @@
|
||||
"time": "2017-11-27T11:13:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tymon/jwt-auth",
|
||||
"version": "dev-develop",
|
||||
"name": "twilio/sdk",
|
||||
"version": "5.17.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tymondesigns/jwt-auth.git",
|
||||
"reference": "2b79229235d83523a05069ccb9c97cd5ec0b8123"
|
||||
"url": "https://github.com/twilio/twilio-php.git",
|
||||
"reference": "ae3477ccf88a0efb5bbe8928274c4a2046aec0c1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/2b79229235d83523a05069ccb9c97cd5ec0b8123",
|
||||
"reference": "2b79229235d83523a05069ccb9c97cd5ec0b8123",
|
||||
"url": "https://api.github.com/repos/twilio/twilio-php/zipball/ae3477ccf88a0efb5bbe8928274c4a2046aec0c1",
|
||||
"reference": "ae3477ccf88a0efb5bbe8928274c4a2046aec0c1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"apigen/apigen": "^4.1",
|
||||
"phpunit/phpunit": "4.5.*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Twilio\\": "Twilio/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Twilio API Team",
|
||||
"email": "api@twilio.com"
|
||||
}
|
||||
],
|
||||
"description": "A PHP wrapper for Twilio's API",
|
||||
"homepage": "http://github.com/twilio/twilio-php",
|
||||
"keywords": [
|
||||
"api",
|
||||
"sms",
|
||||
"twilio"
|
||||
],
|
||||
"time": "2018-04-20T23:40:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tymon/jwt-auth",
|
||||
"version": "1.0.0-rc.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tymondesigns/jwt-auth.git",
|
||||
"reference": "d5220f6a84cbb8300f6f2f0f20aa908d072b4e4b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/d5220f6a84cbb8300f6f2f0f20aa908d072b4e4b",
|
||||
"reference": "d5220f6a84cbb8300f6f2f0f20aa908d072b4e4b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2475,7 +3241,7 @@
|
||||
"jwt",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2018-03-10T22:14:03+00:00"
|
||||
"time": "2018-02-07T20:55:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
@@ -2526,6 +3292,74 @@
|
||||
"environment"
|
||||
],
|
||||
"time": "2016-09-01T10:05:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "zizaco/entrust",
|
||||
"version": "5.2.x-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Zizaco/entrust.git",
|
||||
"reference": "3623cc052937d9e62543402b50f24065720d44b9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Zizaco/entrust/zipball/3623cc052937d9e62543402b50f24065720d44b9",
|
||||
"reference": "3623cc052937d9e62543402b50f24065720d44b9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/cache": "~5.0",
|
||||
"illuminate/console": "~5.0",
|
||||
"illuminate/support": "~5.0",
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"illuminate/database": "~5.0",
|
||||
"mockery/mockery": "dev-master",
|
||||
"phpunit/phpunit": "~4.1",
|
||||
"sami/sami": "dev-master"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/commands"
|
||||
],
|
||||
"psr-4": {
|
||||
"Zizaco\\Entrust\\": "src/Entrust/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andrew Elkins",
|
||||
"homepage": "http://andrewelkins.com"
|
||||
},
|
||||
{
|
||||
"name": "Zizaco Zizuini",
|
||||
"email": "zizaco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Ben Batschelet",
|
||||
"homepage": "http://github.com/bbatsche"
|
||||
},
|
||||
{
|
||||
"name": "Michele Angioni",
|
||||
"email": "michele.angioni@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "This package provides a flexible way to add Role-based Permissions to Laravel",
|
||||
"keywords": [
|
||||
"acl",
|
||||
"auth",
|
||||
"illuminate",
|
||||
"laravel",
|
||||
"permission",
|
||||
"roles"
|
||||
],
|
||||
"time": "2016-12-29T06:25:06+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@@ -4273,7 +5107,7 @@
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": {
|
||||
"tymon/jwt-auth": 20
|
||||
"zizaco/entrust": 20
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
|
||||
+7
-4
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
//'fileDestinationPath' => 'uploads',
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
@@ -150,6 +150,8 @@ return [
|
||||
* Package Service Providers...
|
||||
*/
|
||||
Tymon\JWTAuth\Providers\LaravelServiceProvider::class,
|
||||
Aloha\Twilio\Support\Laravel\ServiceProvider::class,
|
||||
Laratrust\LaratrustServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
@@ -158,8 +160,7 @@ return [
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
App\Providers\RouteServiceProvider::class
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -210,7 +211,9 @@ return [
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
|
||||
'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,
|
||||
|
||||
'Twilio' => Aloha\Twilio\Support\Laravel\Facade::class,
|
||||
'Laratrust' => Laratrust\LaratrustFacade::class,
|
||||
'auth.password.broker' => Illuminate\Auth\Passwords\TokenRepositoryInterface::class
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ return [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'database' => env('DB_DATABASE', 'forgzze'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
|
||||
+303
@@ -0,0 +1,303 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Secret
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Don't forget to set this in your .env file, as it will be used to sign
|
||||
| your tokens. A helper command is provided for this:
|
||||
| `php artisan jwt:secret`
|
||||
|
|
||||
| Note: This will be used for Symmetric algorithms only (HMAC),
|
||||
| since RSA and ECDSA use a private/public key combo (See below).
|
||||
|
|
||||
*/
|
||||
|
||||
'secret' => env('JWT_SECRET'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Keys
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The algorithm you are using, will determine whether your tokens are
|
||||
| signed with a random string (defined in `JWT_SECRET`) or using the
|
||||
| following public & private keys.
|
||||
|
|
||||
| Symmetric Algorithms:
|
||||
| HS256, HS384 & HS512 will use `JWT_SECRET`.
|
||||
|
|
||||
| Asymmetric Algorithms:
|
||||
| RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
|
||||
|
|
||||
*/
|
||||
|
||||
'keys' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Public Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A path or resource to your public key.
|
||||
|
|
||||
| E.g. 'file://path/to/public/key'
|
||||
|
|
||||
*/
|
||||
|
||||
'public' => env('JWT_PUBLIC_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Private Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A path or resource to your private key.
|
||||
|
|
||||
| E.g. 'file://path/to/private/key'
|
||||
|
|
||||
*/
|
||||
|
||||
'private' => env('JWT_PRIVATE_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Passphrase
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The passphrase for your private key. Can be null if none set.
|
||||
|
|
||||
*/
|
||||
|
||||
'passphrase' => env('JWT_PASSPHRASE'),
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token will be valid for.
|
||||
| Defaults to 1 hour.
|
||||
|
|
||||
| You can also set this to null, to yield a never expiring token.
|
||||
| Some people may want this behaviour for e.g. a mobile app.
|
||||
| This is not particularly recommended, so make sure you have appropriate
|
||||
| systems in place to revoke the token if necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'ttl' => env('JWT_TTL', 20160), // one week
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Refresh time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token can be refreshed
|
||||
| within. I.E. The user can refresh their token within a 2 week window of
|
||||
| the original token being created until they must re-authenticate.
|
||||
| Defaults to 2 weeks.
|
||||
|
|
||||
| You can also set this to null, to yield an infinite refresh time.
|
||||
| Some may want this instead of never expiring tokens for e.g. a mobile app.
|
||||
| This is not particularly recommended, so make sure you have appropriate
|
||||
| systems in place to revoke the token if necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT hashing algorithm
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the hashing algorithm that will be used to sign the token.
|
||||
|
|
||||
| See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL
|
||||
| for possible values.
|
||||
|
|
||||
*/
|
||||
|
||||
'algo' => env('JWT_ALGO', 'HS256'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Required Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the required claims that must exist in any token.
|
||||
| A TokenInvalidException will be thrown if any of these claims are not
|
||||
| present in the payload.
|
||||
|
|
||||
*/
|
||||
|
||||
'required_claims' => [
|
||||
'iss',
|
||||
'iat',
|
||||
'exp',
|
||||
'nbf',
|
||||
'sub',
|
||||
'jti',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Persistent Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the claim keys to be persisted when refreshing a token.
|
||||
| `sub` and `iat` will automatically be persisted, in
|
||||
| addition to the these claims.
|
||||
|
|
||||
| Note: If a claim does not exist then it will be ignored.
|
||||
|
|
||||
*/
|
||||
|
||||
'persistent_claims' => [
|
||||
// 'foo',
|
||||
// 'bar',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Lock Subject
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This will determine whether a `prv` claim is automatically added to
|
||||
| the token. The purpose of this is to ensure that if you have multiple
|
||||
| authentication models e.g. `App\User` & `App\OtherPerson`, then we
|
||||
| should prevent one authentication request from impersonating another,
|
||||
| if 2 tokens happen to have the same id across the 2 different models.
|
||||
|
|
||||
| Under specific circumstances, you may want to disable this behaviour
|
||||
| e.g. if you only have one authentication model, then you would save
|
||||
| a little on token size.
|
||||
|
|
||||
*/
|
||||
|
||||
'lock_subject' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Leeway
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This property gives the jwt timestamp claims some "leeway".
|
||||
| Meaning that if you have any unavoidable slight clock skew on
|
||||
| any of your servers then this will afford you some level of cushioning.
|
||||
|
|
||||
| This applies to the claims `iat`, `nbf` and `exp`.
|
||||
|
|
||||
| Specify in seconds - only if you know you need it.
|
||||
|
|
||||
*/
|
||||
|
||||
'leeway' => env('JWT_LEEWAY', 0),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Blacklist Enabled
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| In order to invalidate tokens, you must have the blacklist enabled.
|
||||
| If you do not want or need this functionality, then set this to false.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Blacklist Grace Period
|
||||
| -------------------------------------------------------------------------
|
||||
|
|
||||
| When multiple concurrent requests are made with the same JWT,
|
||||
| it is possible that some of them fail, due to token regeneration
|
||||
| on every request.
|
||||
|
|
||||
| Set grace period in seconds to prevent parallel request failure.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookies encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default Laravel encrypt cookies for security reason.
|
||||
| If you decide to not decrypt cookies, you will have to configure Laravel
|
||||
| to not encrypt your cookie token by adding its name into the $except
|
||||
| array available in the middleware "EncryptCookies" provided by Laravel.
|
||||
| see https://laravel.com/docs/master/responses#cookies-and-encryption
|
||||
| for details.
|
||||
|
|
||||
| Set it to true if you want to decrypt cookies.
|
||||
|
|
||||
*/
|
||||
|
||||
'decrypt_cookies' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the various providers used throughout the package.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to create and decode the tokens.
|
||||
|
|
||||
*/
|
||||
|
||||
'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to authenticate users.
|
||||
|
|
||||
*/
|
||||
|
||||
'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to store tokens in the blacklist.
|
||||
|
|
||||
*/
|
||||
|
||||
'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
@@ -0,0 +1,210 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of Laratrust,
|
||||
* a role & permission management solution for Laravel.
|
||||
*
|
||||
* @license MIT
|
||||
* @package Laratrust
|
||||
*/
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Use MorphMap in relationships between models
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If true, the morphMap feature is going to be used. The array values that
|
||||
| are going to be used are the ones inside the 'user_models' array.
|
||||
|
|
||||
*/
|
||||
'use_morph_map' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Use cache in the package
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Defines if Laratrust will use Laravel's Cache to cache the roles and permissions.
|
||||
|
|
||||
*/
|
||||
'use_cache' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Use teams feature in the package
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Defines if Laratrust will use the teams feature.
|
||||
| Please check the docs to see what you need to do in case you have the package already configured.
|
||||
|
|
||||
*/
|
||||
'use_teams' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Strict check for roles/permissions inside teams
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Determines if a strict check should be done when checking if a role or permission
|
||||
| is attached inside a team.
|
||||
| If it's false, when checking a role/permission without specifying the team,
|
||||
| it will check only if the user has attached that role/permission ignoring the team.
|
||||
|
|
||||
*/
|
||||
'teams_strict_check' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Laratrust User Models
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the array that contains the information of the user models.
|
||||
| This information is used in the add-trait command, and for the roles and
|
||||
| permissions relationships with the possible user models.
|
||||
|
|
||||
| The key in the array is the name of the relationship inside the roles and permissions.
|
||||
|
|
||||
*/
|
||||
'user_models' => [
|
||||
'users' => 'App\User',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Laratrust Models
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These are the models used by Laratrust to define the roles, permissions and teams.
|
||||
| If you want the Laratrust models to be in a different namespace or
|
||||
| to have a different name, you can do it here.
|
||||
|
|
||||
*/
|
||||
'models' => [
|
||||
/**
|
||||
* Role model
|
||||
*/
|
||||
'role' => 'App\Role',
|
||||
|
||||
/**
|
||||
* Permission model
|
||||
*/
|
||||
'permission' => 'App\Permission',
|
||||
|
||||
/**
|
||||
* Team model
|
||||
*/
|
||||
'team' => 'App\Team',
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Laratrust Tables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These are the tables used by Laratrust to store all the authorization data.
|
||||
|
|
||||
*/
|
||||
'tables' => [
|
||||
/**
|
||||
* Roles table.
|
||||
*/
|
||||
'roles' => 'roles',
|
||||
|
||||
/**
|
||||
* Permissions table.
|
||||
*/
|
||||
'permissions' => 'permissions',
|
||||
|
||||
/**
|
||||
* Teams table.
|
||||
*/
|
||||
'teams' => 'teams',
|
||||
|
||||
/**
|
||||
* Role - User intermediate table.
|
||||
*/
|
||||
'role_user' => 'role_user',
|
||||
|
||||
/**
|
||||
* Permission - User intermediate table.
|
||||
*/
|
||||
'permission_user' => 'permission_user',
|
||||
|
||||
/**
|
||||
* Permission - Role intermediate table.
|
||||
*/
|
||||
'permission_role' => 'permission_role',
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Laratrust Foreign Keys
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These are the foreign keys used by laratrust in the intermediate tables.
|
||||
|
|
||||
*/
|
||||
'foreign_keys' => [
|
||||
/**
|
||||
* User foreign key on Laratrust's role_user and permission_user tables.
|
||||
*/
|
||||
'user' => 'user_id',
|
||||
|
||||
/**
|
||||
* Role foreign key on Laratrust's role_user and permission_role tables.
|
||||
*/
|
||||
'role' => 'role_id',
|
||||
|
||||
/**
|
||||
* Role foreign key on Laratrust's permission_user and permission_role tables.
|
||||
*/
|
||||
'permission' => 'permission_id',
|
||||
|
||||
/**
|
||||
* Role foreign key on Laratrust's role_user and permission_user tables.
|
||||
*/
|
||||
'team' => 'team_id',
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Laratrust Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This configuration helps to customize the Laratrust middleware behavior.
|
||||
|
|
||||
*/
|
||||
'middleware' => [
|
||||
/**
|
||||
* Define if the laratrust middleware are registered automatically in the service provider
|
||||
*/
|
||||
'register' => true,
|
||||
|
||||
/**
|
||||
* Method to be called in the middleware return case.
|
||||
* Available: abort|redirect
|
||||
*/
|
||||
'handling' => 'abort',
|
||||
|
||||
/**
|
||||
* Parameter passed to the middleware_handling method
|
||||
*/
|
||||
'params' => '403',
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Laratrust Magic 'can' Method
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Supported cases for the magic can method (Refer to the docs).
|
||||
| Available: camel_case|snake_case|kebab_case
|
||||
|
|
||||
*/
|
||||
'magic_can_method_case' => 'kebab_case',
|
||||
];
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'role_structure' => [
|
||||
'administrator' => [
|
||||
'users' => 'c,r,u,d',
|
||||
'acl' => 'c,r,u,d',
|
||||
'profile' => 'r,u'
|
||||
],
|
||||
'freightforwarder' => [
|
||||
'users' => 'c,r,u,d',
|
||||
'profile' => 'r,u'
|
||||
],
|
||||
'importer' => [
|
||||
'profile' => 'r,u'
|
||||
],
|
||||
],
|
||||
'permission_structure' => [
|
||||
'cru_user' => [
|
||||
'profile' => 'c,r,u'
|
||||
],
|
||||
],
|
||||
'permissions_map' => [
|
||||
'c' => 'create',
|
||||
'r' => 'read',
|
||||
'u' => 'update',
|
||||
'd' => 'delete'
|
||||
]
|
||||
];
|
||||
@@ -1,2 +0,0 @@
|
||||
[auto]
|
||||
server-uuid=ff897b63-45fb-11e8-a5e1-0242ac120002
|
||||
@@ -1,2 +0,0 @@
|
||||
default-character-set=utf8
|
||||
default-collation=utf8_general_ci
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
ÿ% test ÿ% test\_% ÿ% default default
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
˙localhost root ZÜ4ő˙e4506dd5b9b1 root ZÜ4ő
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user