admin and basic functions ready
This commit is contained in:
parent
a23be34cc2
commit
7bcc7410db
|
|
@ -0,0 +1,93 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
|
use App\Http\Requests\AttenderRequest;
|
||||||
|
use App\Models\Event;
|
||||||
|
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||||
|
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class AttenderCrudController
|
||||||
|
* @package App\Http\Controllers\Admin
|
||||||
|
* @property-read \Backpack\CRUD\app\Library\CrudPanel\CrudPanel $crud
|
||||||
|
*/
|
||||||
|
class AttenderCrudController extends CrudController
|
||||||
|
{
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation;
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\ShowOperation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the CrudPanel object. Apply settings to all operations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setup()
|
||||||
|
{
|
||||||
|
CRUD::setModel(\App\Models\Attender::class);
|
||||||
|
CRUD::setRoute(config('backpack.base.route_prefix') . '/attender');
|
||||||
|
CRUD::setEntityNameStrings('attender', 'attenders');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define what happens when the List operation is loaded.
|
||||||
|
*
|
||||||
|
* @see https://backpackforlaravel.com/docs/crud-operation-list-entries
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function setupListOperation()
|
||||||
|
{
|
||||||
|
$this->crud->setFromDb();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Columns can be defined using the fluent syntax or array syntax:
|
||||||
|
* - CRUD::column('price')->type('number');
|
||||||
|
* - CRUD::addColumn(['name' => 'price', 'type' => 'number']);
|
||||||
|
*/
|
||||||
|
$this->crud->addFilter([
|
||||||
|
'name' => 'events',
|
||||||
|
'type' => 'select2',
|
||||||
|
'label' => "Event"
|
||||||
|
], function() {
|
||||||
|
return Event::all()->pluck('name', 'id')->toArray();
|
||||||
|
}, function($value) {
|
||||||
|
$this->crud->query = $this->crud->query->whereHas('events', function ($query) use ($value) {
|
||||||
|
$query->where('event_id', $value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define what happens when the Create operation is loaded.
|
||||||
|
*
|
||||||
|
* @see https://backpackforlaravel.com/docs/crud-operation-create
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function setupCreateOperation()
|
||||||
|
{
|
||||||
|
CRUD::setValidation(AttenderRequest::class);
|
||||||
|
|
||||||
|
$this->crud->setFromDb();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fields can be defined using the fluent syntax or array syntax:
|
||||||
|
* - CRUD::field('price')->type('number');
|
||||||
|
* - CRUD::addField(['name' => 'price', 'type' => 'number']));
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define what happens when the Update operation is loaded.
|
||||||
|
*
|
||||||
|
* @see https://backpackforlaravel.com/docs/crud-operation-update
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function setupUpdateOperation()
|
||||||
|
{
|
||||||
|
$this->setupCreateOperation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
|
use App\Http\Requests\EventRequest;
|
||||||
|
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||||
|
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class EventCrudController
|
||||||
|
* @package App\Http\Controllers\Admin
|
||||||
|
* @property-read \Backpack\CRUD\app\Library\CrudPanel\CrudPanel $crud
|
||||||
|
*/
|
||||||
|
class EventCrudController extends CrudController
|
||||||
|
{
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation;
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
|
||||||
|
use \Backpack\CRUD\app\Http\Controllers\Operations\ShowOperation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the CrudPanel object. Apply settings to all operations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setup()
|
||||||
|
{
|
||||||
|
CRUD::setModel(\App\Models\Event::class);
|
||||||
|
CRUD::setRoute(config('backpack.base.route_prefix') . '/event');
|
||||||
|
CRUD::setEntityNameStrings('event', 'events');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define what happens when the List operation is loaded.
|
||||||
|
*
|
||||||
|
* @see https://backpackforlaravel.com/docs/crud-operation-list-entries
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function setupListOperation()
|
||||||
|
{
|
||||||
|
$this->crud->addColumns([
|
||||||
|
[ // Upload
|
||||||
|
'name' => 'image',
|
||||||
|
'label' => 'Image',
|
||||||
|
'type' => 'image',
|
||||||
|
'prefix' => 'storage/'
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
$this->crud->setFromDb();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Columns can be defined using the fluent syntax or array syntax:
|
||||||
|
* - CRUD::column('price')->type('number');
|
||||||
|
* - CRUD::addColumn(['name' => 'price', 'type' => 'number']);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define what happens when the Create operation is loaded.
|
||||||
|
*
|
||||||
|
* @see https://backpackforlaravel.com/docs/crud-operation-create
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function setupCreateOperation()
|
||||||
|
{
|
||||||
|
CRUD::setValidation(EventRequest::class);
|
||||||
|
|
||||||
|
$this->crud->setFromDb();
|
||||||
|
$this->crud->addFields([
|
||||||
|
[ // Upload
|
||||||
|
'name' => 'image',
|
||||||
|
'label' => 'Image',
|
||||||
|
'type' => 'upload',
|
||||||
|
'upload' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fields can be defined using the fluent syntax or array syntax:
|
||||||
|
* - CRUD::field('price')->type('number');
|
||||||
|
* - CRUD::addField(['name' => 'price', 'type' => 'number']));
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define what happens when the Update operation is loaded.
|
||||||
|
*
|
||||||
|
* @see https://backpackforlaravel.com/docs/crud-operation-update
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function setupUpdateOperation()
|
||||||
|
{
|
||||||
|
$this->setupCreateOperation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,18 +4,14 @@
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Mail\Message;
|
|
||||||
use App\Providers\RouteServiceProvider;
|
use App\Providers\RouteServiceProvider;
|
||||||
use Illuminate\Auth\Events\Registered;
|
use Illuminate\Auth\Events\Registered;
|
||||||
use Illuminate\Http\File;
|
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Support\Facades\Mail;
|
|
||||||
use Illuminate\Validation\Rules;
|
use Illuminate\Validation\Rules;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
use SimpleSoftwareIO\QrCode\Facades\QrCode;
|
|
||||||
|
|
||||||
class RegisteredUserController extends Controller
|
class RegisteredUserController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -46,31 +42,6 @@ public function store(Request $request): RedirectResponse
|
||||||
'password' => Hash::make($request->password),
|
'password' => Hash::make($request->password),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Generate QR code image data URL
|
|
||||||
$file_name = uniqid() . '.png';
|
|
||||||
$qrCodePath = public_path('qr/' . $file_name);
|
|
||||||
QrCode::format('png')->size(512)->margin(10)->generate($user->id, $qrCodePath);
|
|
||||||
// $qrCode = QrCode::size(200)->generate($user->id);
|
|
||||||
// $dataUrl = 'data:image/png;base64,' . base64_encode($qrCode);
|
|
||||||
//dd($qrCode, $dataUrl);
|
|
||||||
|
|
||||||
Mail::send('emails.qr', ['file_name' => $file_name], function (Message $message) use ($user, $qrCodePath) {
|
|
||||||
$message->to($user->email)->subject('QRCode');
|
|
||||||
|
|
||||||
$pngFile = new File($qrCodePath);
|
|
||||||
$message->attach($pngFile, ['as' => 'qr_code2.png', 'mime' => 'image/png']);
|
|
||||||
//$message->attachData($pngFile, 'qr_code.png', ['mime' => 'image/png']);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Send email with QR code as an attachment
|
|
||||||
// Mail::send('emails.qr', ['dataUrl' => $dataUrl], function (Message $message) use ($user, $qrCode, $dataUrl) {
|
|
||||||
// $message->to($user->email)->subject('QRCode');
|
|
||||||
// //$message->attachData($dataUrl, 'qr_code.png', ['mime' => 'image/png']);
|
|
||||||
// //$message->attachData($qrCode, 'qr_code.png', ['mime' => 'image/png']);
|
|
||||||
// });
|
|
||||||
dd('ok');
|
|
||||||
|
|
||||||
event(new Registered($user));
|
event(new Registered($user));
|
||||||
|
|
||||||
Auth::login($user);
|
Auth::login($user);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Attender;
|
||||||
|
use App\Models\Event;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use SimpleSoftwareIO\QrCode\Facades\QrCode;
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
use Illuminate\Http\File;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Mail\Message;
|
||||||
|
|
||||||
|
class HomeController extends Controller
|
||||||
|
{
|
||||||
|
public function index(){
|
||||||
|
$events = Event::orderBy('event_date', 'desc')->paginate(3);
|
||||||
|
return view('welcome', [
|
||||||
|
'events' => $events
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function apply($id){
|
||||||
|
$event_id = $id;
|
||||||
|
return view('signup', [
|
||||||
|
'event_id' => $event_id
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function submit(Request $request){
|
||||||
|
$data = $request->only(['name', 'surname', 'email', 'file', 'organization', 'is_attending', 'consent_form']);
|
||||||
|
$data['attended'] = 0;
|
||||||
|
$data['is_attending'] = (bool)$data['is_attending'];
|
||||||
|
$data['consent_form'] = (bool)$data['consent_form'];
|
||||||
|
|
||||||
|
$attender = Attender::create($data);
|
||||||
|
$attender->events()->attach($request->event_id);
|
||||||
|
|
||||||
|
$attendance = DB::table('event_attenders')
|
||||||
|
->where('event_id', $request->event_id)
|
||||||
|
->where('attender_id', $attender->id)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
$file_name = uniqid() . '.png';
|
||||||
|
$qrCodePath = public_path('qr/' . $file_name);
|
||||||
|
QrCode::format('png')->size(512)->margin(10)->generate($attendance->id, $qrCodePath);
|
||||||
|
|
||||||
|
Mail::send('emails.qr', ['file_name' => $file_name], function (Message $message) use ($attendance, $qrCodePath) {
|
||||||
|
$message->to($attendance->email)->subject('QRCode');
|
||||||
|
|
||||||
|
$pngFile = new File($qrCodePath);
|
||||||
|
$message->attach($pngFile, ['as' => 'qr_code2.png', 'mime' => 'image/png']);
|
||||||
|
});
|
||||||
|
|
||||||
|
return view('success');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use App\Http\Requests\ProfileUpdateRequest;
|
|
||||||
use Illuminate\Http\RedirectResponse;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Redirect;
|
|
||||||
use Illuminate\View\View;
|
|
||||||
|
|
||||||
class ProfileController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Display the user's profile form.
|
|
||||||
*/
|
|
||||||
public function edit(Request $request): View
|
|
||||||
{
|
|
||||||
return view('profile.edit', [
|
|
||||||
'user' => $request->user(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the user's profile information.
|
|
||||||
*/
|
|
||||||
public function update(ProfileUpdateRequest $request): RedirectResponse
|
|
||||||
{
|
|
||||||
$request->user()->fill($request->validated());
|
|
||||||
|
|
||||||
if ($request->user()->isDirty('email')) {
|
|
||||||
$request->user()->email_verified_at = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$request->user()->save();
|
|
||||||
|
|
||||||
return Redirect::route('profile.edit')->with('status', 'profile-updated');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete the user's account.
|
|
||||||
*/
|
|
||||||
public function destroy(Request $request): RedirectResponse
|
|
||||||
{
|
|
||||||
$request->validateWithBag('userDeletion', [
|
|
||||||
'password' => ['required', 'current_password'],
|
|
||||||
]);
|
|
||||||
|
|
||||||
$user = $request->user();
|
|
||||||
|
|
||||||
Auth::logout();
|
|
||||||
|
|
||||||
$user->delete();
|
|
||||||
|
|
||||||
$request->session()->invalidate();
|
|
||||||
$request->session()->regenerateToken();
|
|
||||||
|
|
||||||
return Redirect::to('/');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class AttenderRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
// only allow updates if the user is logged in
|
||||||
|
return backpack_auth()->check();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
// 'name' => 'required|min:5|max:255'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation attributes that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function attributes()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation messages that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function messages()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class EventRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
// only allow updates if the user is logged in
|
||||||
|
return backpack_auth()->check();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
// 'name' => 'required|min:5|max:255'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation attributes that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function attributes()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation messages that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function messages()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Backpack\CRUD\app\Models\Traits\CrudTrait;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Attender extends Model
|
||||||
|
{
|
||||||
|
use CrudTrait;
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| GLOBAL VARIABLES
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
protected $table = 'attenders';
|
||||||
|
// protected $primaryKey = 'id';
|
||||||
|
// public $timestamps = false;
|
||||||
|
protected $guarded = ['id'];
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'surname',
|
||||||
|
'email',
|
||||||
|
'file',
|
||||||
|
'is_attending',
|
||||||
|
'attended',
|
||||||
|
'consent_form'
|
||||||
|
];
|
||||||
|
// protected $hidden = [];
|
||||||
|
// protected $dates = [];
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| FUNCTIONS
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| RELATIONS
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
public function events(){
|
||||||
|
return $this->belongsToMany(Event::class, 'event_attenders', 'attender_id', 'event_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SCOPES
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| ACCESSORS
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| MUTATORS
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
public function setFileAttribute($value)
|
||||||
|
{
|
||||||
|
$attribute_name = "file";
|
||||||
|
$disk = "public";
|
||||||
|
$destination_path = "files/uploads";
|
||||||
|
|
||||||
|
$this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path, $fileName = null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
static::deleting(function($obj) {
|
||||||
|
if($obj->file){
|
||||||
|
\Storage::disk('public')->delete($obj->file);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Backpack\CRUD\app\Models\Traits\CrudTrait;
|
||||||
|
use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\HasTranslations;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Event extends Model
|
||||||
|
{
|
||||||
|
use CrudTrait;
|
||||||
|
use HasFactory;
|
||||||
|
use HasTranslations;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| GLOBAL VARIABLES
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
protected $table = 'events';
|
||||||
|
// protected $primaryKey = 'id';
|
||||||
|
// public $timestamps = false;
|
||||||
|
protected $guarded = ['id'];
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'applications_start_date',
|
||||||
|
'application_end_date',
|
||||||
|
'event_date',
|
||||||
|
'duration',
|
||||||
|
'is_active',
|
||||||
|
'image'
|
||||||
|
];
|
||||||
|
// protected $hidden = [];
|
||||||
|
// protected $dates = [];
|
||||||
|
protected $translatable = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'duration'
|
||||||
|
];
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| FUNCTIONS
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| RELATIONS
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
public function events(){
|
||||||
|
return $this->belongsToMany(Attender::class, 'event_attenders', 'event_id', 'attender_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SCOPES
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| ACCESSORS
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| MUTATORS
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
public function setImageAttribute($value)
|
||||||
|
{
|
||||||
|
$attribute_name = "image";
|
||||||
|
$disk = "public";
|
||||||
|
$destination_path = "events/images";
|
||||||
|
|
||||||
|
$this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path, $fileName = null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
static::deleting(function($obj) {
|
||||||
|
if($obj->image){
|
||||||
|
|
||||||
|
\Storage::disk('public')->delete($obj->image);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,10 +7,13 @@
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
use Laravel\Sanctum\HasApiTokens;
|
use Laravel\Sanctum\HasApiTokens;
|
||||||
|
use Backpack\CRUD\app\Models\Traits\CrudTrait; // <------------------------------- this one
|
||||||
|
use Spatie\Permission\Traits\HasRoles;// <---------------------- and this one
|
||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
use HasApiTokens, HasFactory, Notifiable;
|
use HasApiTokens, HasFactory, Notifiable;
|
||||||
|
use HasRoles, CrudTrait; // <------ and this
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
|
|
@ -21,7 +24,6 @@ class User extends Authenticatable
|
||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
'password',
|
'password',
|
||||||
'has_shownup'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@
|
||||||
"laravel/framework": "^10.0",
|
"laravel/framework": "^10.0",
|
||||||
"laravel/sanctum": "^3.2",
|
"laravel/sanctum": "^3.2",
|
||||||
"laravel/tinker": "^2.8",
|
"laravel/tinker": "^2.8",
|
||||||
"simplesoftwareio/simple-qrcode": "^4.2"
|
"simplesoftwareio/simple-qrcode": "^4.2",
|
||||||
|
"spatie/laravel-permission": "^5.10",
|
||||||
|
"spatie/laravel-translatable": "^6.4"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"backpack/generators": "^3.3",
|
"backpack/generators": "^3.3",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "f9a42c8e8cd24d3771f11685a5f4951d",
|
"content-hash": "f578326be5580eb2c9b6ed848f711510",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "backpack/crud",
|
"name": "backpack/crud",
|
||||||
|
|
@ -3936,6 +3936,66 @@
|
||||||
},
|
},
|
||||||
"time": "2021-02-08T20:43:55+00:00"
|
"time": "2021-02-08T20:43:55+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/laravel-package-tools",
|
||||||
|
"version": "1.14.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/laravel-package-tools.git",
|
||||||
|
"reference": "bab62023a4745a61170ad5424184533685e73c2d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/bab62023a4745a61170ad5424184533685e73c2d",
|
||||||
|
"reference": "bab62023a4745a61170ad5424184533685e73c2d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/contracts": "^9.28|^10.0",
|
||||||
|
"php": "^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^1.5",
|
||||||
|
"orchestra/testbench": "^7.7|^8.0",
|
||||||
|
"pestphp/pest": "^1.22",
|
||||||
|
"phpunit/phpunit": "^9.5.24",
|
||||||
|
"spatie/pest-plugin-test-time": "^1.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Spatie\\LaravelPackageTools\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Freek Van der Herten",
|
||||||
|
"email": "freek@spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Tools for creating Laravel packages",
|
||||||
|
"homepage": "https://github.com/spatie/laravel-package-tools",
|
||||||
|
"keywords": [
|
||||||
|
"laravel-package-tools",
|
||||||
|
"spatie"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/spatie/laravel-package-tools/issues",
|
||||||
|
"source": "https://github.com/spatie/laravel-package-tools/tree/1.14.2"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/spatie",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-03-14T16:41:21+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-permission",
|
"name": "spatie/laravel-permission",
|
||||||
"version": "5.10.1",
|
"version": "5.10.1",
|
||||||
|
|
@ -4018,6 +4078,87 @@
|
||||||
],
|
],
|
||||||
"time": "2023-04-12T17:08:32+00:00"
|
"time": "2023-04-12T17:08:32+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "spatie/laravel-translatable",
|
||||||
|
"version": "6.4.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/spatie/laravel-translatable.git",
|
||||||
|
"reference": "f472fbaec8a3d44096d3c6ed029484d0bf9116a7"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/f472fbaec8a3d44096d3c6ed029484d0bf9116a7",
|
||||||
|
"reference": "f472fbaec8a3d44096d3c6ed029484d0bf9116a7",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/database": "^9.0|^10.0",
|
||||||
|
"illuminate/support": "^9.0|^10.0",
|
||||||
|
"php": "^8.0",
|
||||||
|
"spatie/laravel-package-tools": "^1.11"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^1.4",
|
||||||
|
"orchestra/testbench": "^7.0|^8.0",
|
||||||
|
"pestphp/pest": "^1.20"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Spatie\\Translatable\\TranslatableServiceProvider"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"aliases": {
|
||||||
|
"Translatable": "Spatie\\Translatable\\Facades\\Translatable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Spatie\\Translatable\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Freek Van der Herten",
|
||||||
|
"email": "freek@spatie.be",
|
||||||
|
"homepage": "https://spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Sebastian De Deyne",
|
||||||
|
"email": "sebastian@spatie.be",
|
||||||
|
"homepage": "https://spatie.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A trait to make an Eloquent model hold translations",
|
||||||
|
"homepage": "https://github.com/spatie/laravel-translatable",
|
||||||
|
"keywords": [
|
||||||
|
"eloquent",
|
||||||
|
"i8n",
|
||||||
|
"laravel-translatable",
|
||||||
|
"model",
|
||||||
|
"multilingual",
|
||||||
|
"spatie",
|
||||||
|
"translate"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/spatie/laravel-translatable/tree/6.4.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/spatie",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-03-19T17:50:34+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v6.2.8",
|
"version": "v6.2.8",
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@
|
||||||
// App\Providers\BroadcastServiceProvider::class,
|
// App\Providers\BroadcastServiceProvider::class,
|
||||||
App\Providers\EventServiceProvider::class,
|
App\Providers\EventServiceProvider::class,
|
||||||
App\Providers\RouteServiceProvider::class,
|
App\Providers\RouteServiceProvider::class,
|
||||||
|
Spatie\Permission\PermissionServiceProvider::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Models
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Models used in the User, Role and Permission CRUDs.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'models' => [
|
||||||
|
'user' => config('backpack.base.user_model_fqn', \App\Models\User::class),
|
||||||
|
'permission' => Backpack\PermissionManager\app\Models\Permission::class,
|
||||||
|
'role' => Backpack\PermissionManager\app\Models\Role::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Disallow the user interface for creating/updating permissions or roles.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Roles and permissions are used in code by their name
|
||||||
|
| - ex: $user->hasPermissionTo('edit articles');
|
||||||
|
|
|
||||||
|
| So after the developer has entered all permissions and roles, the administrator should either:
|
||||||
|
| - not have access to the panels
|
||||||
|
| or
|
||||||
|
| - creating and updating should be disabled
|
||||||
|
*/
|
||||||
|
|
||||||
|
'allow_permission_create' => true,
|
||||||
|
'allow_permission_update' => true,
|
||||||
|
'allow_permission_delete' => true,
|
||||||
|
'allow_role_create' => true,
|
||||||
|
'allow_role_update' => true,
|
||||||
|
'allow_role_delete' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Multiple-guards functionality
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'multiple_guards' => false,
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,161 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
'models' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When using the "HasPermissions" trait from this package, we need to know which
|
||||||
|
* Eloquent model should be used to retrieve your permissions. Of course, it
|
||||||
|
* is often just the "Permission" model but you may use whatever you like.
|
||||||
|
*
|
||||||
|
* The model you want to use as a Permission model needs to implement the
|
||||||
|
* `Spatie\Permission\Contracts\Permission` contract.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'permission' => Spatie\Permission\Models\Permission::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When using the "HasRoles" trait from this package, we need to know which
|
||||||
|
* Eloquent model should be used to retrieve your roles. Of course, it
|
||||||
|
* is often just the "Role" model but you may use whatever you like.
|
||||||
|
*
|
||||||
|
* The model you want to use as a Role model needs to implement the
|
||||||
|
* `Spatie\Permission\Contracts\Role` contract.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'role' => Spatie\Permission\Models\Role::class,
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
'table_names' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When using the "HasRoles" trait from this package, we need to know which
|
||||||
|
* table should be used to retrieve your roles. We have chosen a basic
|
||||||
|
* default value but you may easily change it to any table you like.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'roles' => 'roles',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When using the "HasPermissions" trait from this package, we need to know which
|
||||||
|
* table should be used to retrieve your permissions. We have chosen a basic
|
||||||
|
* default value but you may easily change it to any table you like.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'permissions' => 'permissions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When using the "HasPermissions" trait from this package, we need to know which
|
||||||
|
* table should be used to retrieve your models permissions. We have chosen a
|
||||||
|
* basic default value but you may easily change it to any table you like.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'model_has_permissions' => 'model_has_permissions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When using the "HasRoles" trait from this package, we need to know which
|
||||||
|
* table should be used to retrieve your models roles. We have chosen a
|
||||||
|
* basic default value but you may easily change it to any table you like.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'model_has_roles' => 'model_has_roles',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When using the "HasRoles" trait from this package, we need to know which
|
||||||
|
* table should be used to retrieve your roles permissions. We have chosen a
|
||||||
|
* basic default value but you may easily change it to any table you like.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'role_has_permissions' => 'role_has_permissions',
|
||||||
|
],
|
||||||
|
|
||||||
|
'column_names' => [
|
||||||
|
/*
|
||||||
|
* Change this if you want to name the related pivots other than defaults
|
||||||
|
*/
|
||||||
|
'role_pivot_key' => null, //default 'role_id',
|
||||||
|
'permission_pivot_key' => null, //default 'permission_id',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Change this if you want to name the related model primary key other than
|
||||||
|
* `model_id`.
|
||||||
|
*
|
||||||
|
* For example, this would be nice if your primary keys are all UUIDs. In
|
||||||
|
* that case, name this `model_uuid`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'model_morph_key' => 'model_id',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Change this if you want to use the teams feature and your related model's
|
||||||
|
* foreign key is other than `team_id`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'team_foreign_key' => 'team_id',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When set to true, the method for checking permissions will be registered on the gate.
|
||||||
|
* Set this to false, if you want to implement custom logic for checking permissions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'register_permission_check_method' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When set to true the package implements teams using the 'team_foreign_key'. If you want
|
||||||
|
* the migrations to register the 'team_foreign_key', you must set this to true
|
||||||
|
* before doing the migration. If you already did the migration then you must make a new
|
||||||
|
* migration to also add 'team_foreign_key' to 'roles', 'model_has_roles', and
|
||||||
|
* 'model_has_permissions'(view the latest version of package's migration file)
|
||||||
|
*/
|
||||||
|
|
||||||
|
'teams' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When set to true, the required permission names are added to the exception
|
||||||
|
* message. This could be considered an information leak in some contexts, so
|
||||||
|
* the default setting is false here for optimum safety.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'display_permission_in_exception' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When set to true, the required role names are added to the exception
|
||||||
|
* message. This could be considered an information leak in some contexts, so
|
||||||
|
* the default setting is false here for optimum safety.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'display_role_in_exception' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* By default wildcard permission lookups are disabled.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enable_wildcard_permission' => false,
|
||||||
|
|
||||||
|
'cache' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* By default all permissions are cached for 24 hours to speed up performance.
|
||||||
|
* When permissions or roles are updated the cache is flushed automatically.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'expiration_time' => \DateInterval::createFromDateString('24 hours'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The cache key used to store all permissions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'key' => 'spatie.permission.cache',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* You may optionally indicate a specific cache driver to use for permission and
|
||||||
|
* role caching using any of the `store` drivers listed in the cache.php config
|
||||||
|
* file. Using 'default' here means to use the `default` set in cache.php.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'store' => 'default',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
@ -15,7 +15,6 @@ public function up(): void
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('email')->unique();
|
$table->string('email')->unique();
|
||||||
$table->boolean('has_shownup')->nullable();
|
|
||||||
$table->timestamp('email_verified_at')->nullable();
|
$table->timestamp('email_verified_at')->nullable();
|
||||||
$table->string('password');
|
$table->string('password');
|
||||||
$table->rememberToken();
|
$table->rememberToken();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
class RemoveBackpackuserModel extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
// establish the table names
|
||||||
|
$model_has_roles = config('permission.table_names.model_has_roles');
|
||||||
|
$model_has_permissions = config('permission.table_names.model_has_permissions');
|
||||||
|
|
||||||
|
// replace the BackpackUser model with User
|
||||||
|
if (\Illuminate\Support\Facades\Schema::hasTable($model_has_roles)) {
|
||||||
|
$this->replaceModels($model_has_roles);
|
||||||
|
}
|
||||||
|
if (\Illuminate\Support\Facades\Schema::hasTable($model_has_permissions)) {
|
||||||
|
$this->replaceModels($model_has_permissions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function replaceModels($table_name)
|
||||||
|
{
|
||||||
|
Log::info('Replacing BackpackUser model in '.$table_name);
|
||||||
|
|
||||||
|
// if you've ended up with duplicate entries (both for App\User and App\Models\BackpackUser)
|
||||||
|
// we can just delete them
|
||||||
|
$userEntries = DB::table($table_name)
|
||||||
|
->where('model_type', "App\User")
|
||||||
|
->get();
|
||||||
|
|
||||||
|
foreach ($userEntries as $entry) {
|
||||||
|
DB::table($table_name)
|
||||||
|
->where('role_id', $entry->role_id)
|
||||||
|
->where('model_type', 'App\Models\BackpackUser')
|
||||||
|
->where('model_id', $entry->model_id)
|
||||||
|
->delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
// for the rest of them, we can just replace the BackpackUser model with User
|
||||||
|
DB::table($table_name)
|
||||||
|
->where('model_type', "App\Models\BackpackUser")
|
||||||
|
->update([
|
||||||
|
'model_type' => "App\User",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('events', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->dateTime('event_date')->nullable();
|
||||||
|
$table->dateTime('applications_start_date')->nullable();
|
||||||
|
$table->dateTime('application_end_date')->nullable();
|
||||||
|
$table->boolean('is_active')->nullable();
|
||||||
|
$table->text('duration')->nullable();
|
||||||
|
$table->string('image')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('events');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('attenders', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->string('surname')->nullable();
|
||||||
|
$table->string('email')->nullable();
|
||||||
|
$table->string('organization')->nullable();
|
||||||
|
$table->string('file')->nullable();
|
||||||
|
$table->boolean('is_attending')->default(1);
|
||||||
|
$table->boolean('consent_form')->default(1);
|
||||||
|
$table->boolean('attended')->default(0);
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('attenders');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('event_attenders', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->foreignId('event_id')->references('id')->on('events')->onDelete('cascade');
|
||||||
|
$table->foreignId('attender_id')->references('id')->on('attenders')->onDelete('cascade');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('event_attenders');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,141 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Spatie\Permission\PermissionRegistrar;
|
||||||
|
|
||||||
|
class CreatePermissionTables extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$tableNames = config('permission.table_names');
|
||||||
|
$columnNames = config('permission.column_names');
|
||||||
|
$teams = config('permission.teams');
|
||||||
|
|
||||||
|
if (empty($tableNames)) {
|
||||||
|
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||||
|
}
|
||||||
|
if ($teams && empty($columnNames['team_foreign_key'] ?? null)) {
|
||||||
|
throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||||
|
}
|
||||||
|
|
||||||
|
Schema::create($tableNames['permissions'], function (Blueprint $table) {
|
||||||
|
$table->bigIncrements('id'); // permission id
|
||||||
|
$table->string('name'); // For MySQL 8.0 use string('name', 125);
|
||||||
|
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->unique(['name', 'guard_name']);
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) {
|
||||||
|
$table->bigIncrements('id'); // role id
|
||||||
|
if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing
|
||||||
|
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
|
||||||
|
$table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index');
|
||||||
|
}
|
||||||
|
$table->string('name'); // For MySQL 8.0 use string('name', 125);
|
||||||
|
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
|
||||||
|
$table->timestamps();
|
||||||
|
if ($teams || config('permission.testing')) {
|
||||||
|
$table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']);
|
||||||
|
} else {
|
||||||
|
$table->unique(['name', 'guard_name']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) {
|
||||||
|
$table->unsignedBigInteger(PermissionRegistrar::$pivotPermission);
|
||||||
|
|
||||||
|
$table->string('model_type');
|
||||||
|
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||||
|
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
|
||||||
|
|
||||||
|
$table->foreign(PermissionRegistrar::$pivotPermission)
|
||||||
|
->references('id') // permission id
|
||||||
|
->on($tableNames['permissions'])
|
||||||
|
->onDelete('cascade');
|
||||||
|
if ($teams) {
|
||||||
|
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||||
|
$table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index');
|
||||||
|
|
||||||
|
$table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||||
|
'model_has_permissions_permission_model_type_primary');
|
||||||
|
} else {
|
||||||
|
$table->primary([PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||||
|
'model_has_permissions_permission_model_type_primary');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) {
|
||||||
|
$table->unsignedBigInteger(PermissionRegistrar::$pivotRole);
|
||||||
|
|
||||||
|
$table->string('model_type');
|
||||||
|
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||||
|
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
|
||||||
|
|
||||||
|
$table->foreign(PermissionRegistrar::$pivotRole)
|
||||||
|
->references('id') // role id
|
||||||
|
->on($tableNames['roles'])
|
||||||
|
->onDelete('cascade');
|
||||||
|
if ($teams) {
|
||||||
|
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||||
|
$table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index');
|
||||||
|
|
||||||
|
$table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||||
|
'model_has_roles_role_model_type_primary');
|
||||||
|
} else {
|
||||||
|
$table->primary([PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||||
|
'model_has_roles_role_model_type_primary');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) {
|
||||||
|
$table->unsignedBigInteger(PermissionRegistrar::$pivotPermission);
|
||||||
|
$table->unsignedBigInteger(PermissionRegistrar::$pivotRole);
|
||||||
|
|
||||||
|
$table->foreign(PermissionRegistrar::$pivotPermission)
|
||||||
|
->references('id') // permission id
|
||||||
|
->on($tableNames['permissions'])
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreign(PermissionRegistrar::$pivotRole)
|
||||||
|
->references('id') // role id
|
||||||
|
->on($tableNames['roles'])
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->primary([PermissionRegistrar::$pivotPermission, PermissionRegistrar::$pivotRole], 'role_has_permissions_permission_id_role_id_primary');
|
||||||
|
});
|
||||||
|
|
||||||
|
app('cache')
|
||||||
|
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
|
||||||
|
->forget(config('permission.cache.key'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$tableNames = config('permission.table_names');
|
||||||
|
|
||||||
|
if (empty($tableNames)) {
|
||||||
|
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
|
||||||
|
}
|
||||||
|
|
||||||
|
Schema::drop($tableNames['role_has_permissions']);
|
||||||
|
Schema::drop($tableNames['model_has_roles']);
|
||||||
|
Schema::drop($tableNames['model_has_permissions']);
|
||||||
|
Schema::drop($tableNames['roles']);
|
||||||
|
Schema::drop($tableNames['permissions']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,159 @@
|
||||||
|
*, *:before, *:after {
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Nunito', sans-serif;
|
||||||
|
color: #384047;
|
||||||
|
background: #4169e11c;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
width: 30%;
|
||||||
|
margin: 10px auto;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0 0 30px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"],
|
||||||
|
input[type="password"],
|
||||||
|
input[type="date"],
|
||||||
|
input[type="datetime"],
|
||||||
|
input[type="email"],
|
||||||
|
input[type="number"],
|
||||||
|
input[type="search"],
|
||||||
|
input[type="tel"],
|
||||||
|
input[type="time"],
|
||||||
|
input[type="url"],
|
||||||
|
textarea,
|
||||||
|
select {
|
||||||
|
background: rgba(255,255,255,0.1);
|
||||||
|
border: none;
|
||||||
|
font-size: 16px;
|
||||||
|
height: 40px;
|
||||||
|
margin: 0;
|
||||||
|
outline: 0;
|
||||||
|
padding: 15px;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #f4f7f8;
|
||||||
|
color: #8a97a0;
|
||||||
|
box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="radio"]{
|
||||||
|
margin: 0 4px 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 19px 39px 18px 39px;
|
||||||
|
color: #FFF;
|
||||||
|
background-color: #4169e1;
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
font-style: normal;
|
||||||
|
border-radius: 5px;
|
||||||
|
width: 100%;
|
||||||
|
border: none;
|
||||||
|
border-width: 1px 1px 3px;
|
||||||
|
box-shadow: 0 -1px 0 rgba(255,255,255,0.1) inset;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
legend {
|
||||||
|
font-size: 1.4em;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label.light {
|
||||||
|
font-weight: 300;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
background-color: #5fcf80;
|
||||||
|
color: #fff;
|
||||||
|
height: 30px;
|
||||||
|
width: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.8em;
|
||||||
|
margin-right: 4px;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
text-shadow: 0 1px 0 rgba(255,255,255,0.2);
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox] + label {
|
||||||
|
display: block;
|
||||||
|
margin: 0.2em;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox] + label:before {
|
||||||
|
content: "\2714";
|
||||||
|
border: 0.1em solid #000;
|
||||||
|
border-radius: 0.2em;
|
||||||
|
display: inline-block;
|
||||||
|
width: 1.2em;
|
||||||
|
height: 1.3em;
|
||||||
|
padding-left: 0.2em;
|
||||||
|
padding-bottom: 0.3em;
|
||||||
|
margin-right: 1em;
|
||||||
|
vertical-align: bottom;
|
||||||
|
color: transparent;
|
||||||
|
transition: .2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox] + label:active:before {
|
||||||
|
transform: scale(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox]:checked + label:before {
|
||||||
|
background-color: #4169e1;
|
||||||
|
border-color: #4169e1;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox]:disabled + label:before {
|
||||||
|
transform: scale(1);
|
||||||
|
border-color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox]:checked:disabled + label:before {
|
||||||
|
transform: scale(1);
|
||||||
|
background-color: #bfb;
|
||||||
|
border-color: #bfb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
form {
|
||||||
|
width: 97%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,27 +0,0 @@
|
||||||
<x-guest-layout>
|
|
||||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
|
||||||
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form method="POST" action="{{ route('password.confirm') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<!-- Password -->
|
|
||||||
<div>
|
|
||||||
<x-input-label for="password" :value="__('Password')" />
|
|
||||||
|
|
||||||
<x-text-input id="password" class="block mt-1 w-full"
|
|
||||||
type="password"
|
|
||||||
name="password"
|
|
||||||
required autocomplete="current-password" />
|
|
||||||
|
|
||||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex justify-end mt-4">
|
|
||||||
<x-primary-button>
|
|
||||||
{{ __('Confirm') }}
|
|
||||||
</x-primary-button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</x-guest-layout>
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
<x-guest-layout>
|
|
||||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
|
||||||
{{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Session Status -->
|
|
||||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
|
||||||
|
|
||||||
<form method="POST" action="{{ route('password.email') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<!-- Email Address -->
|
|
||||||
<div>
|
|
||||||
<x-input-label for="email" :value="__('Email')" />
|
|
||||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
|
|
||||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center justify-end mt-4">
|
|
||||||
<x-primary-button>
|
|
||||||
{{ __('Email Password Reset Link') }}
|
|
||||||
</x-primary-button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</x-guest-layout>
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
<x-guest-layout>
|
|
||||||
<!-- Session Status -->
|
|
||||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
|
||||||
|
|
||||||
<form method="POST" action="{{ route('login') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<!-- Email Address -->
|
|
||||||
<div>
|
|
||||||
<x-input-label for="email" :value="__('Email')" />
|
|
||||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus autocomplete="username" />
|
|
||||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Password -->
|
|
||||||
<div class="mt-4">
|
|
||||||
<x-input-label for="password" :value="__('Password')" />
|
|
||||||
|
|
||||||
<x-text-input id="password" class="block mt-1 w-full"
|
|
||||||
type="password"
|
|
||||||
name="password"
|
|
||||||
required autocomplete="current-password" />
|
|
||||||
|
|
||||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Remember Me -->
|
|
||||||
<div class="block mt-4">
|
|
||||||
<label for="remember_me" class="inline-flex items-center">
|
|
||||||
<input id="remember_me" type="checkbox" class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800" name="remember">
|
|
||||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Remember me') }}</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center justify-end mt-4">
|
|
||||||
@if (Route::has('password.request'))
|
|
||||||
<a class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800" href="{{ route('password.request') }}">
|
|
||||||
{{ __('Forgot your password?') }}
|
|
||||||
</a>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<x-primary-button class="ml-3">
|
|
||||||
{{ __('Log in') }}
|
|
||||||
</x-primary-button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</x-guest-layout>
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
<x-guest-layout>
|
|
||||||
<form method="POST" action="{{ route('register') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<!-- Name -->
|
|
||||||
<div>
|
|
||||||
<x-input-label for="name" :value="__('Name')" />
|
|
||||||
<x-text-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name')" required autofocus autocomplete="name" />
|
|
||||||
<x-input-error :messages="$errors->get('name')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Email Address -->
|
|
||||||
<div class="mt-4">
|
|
||||||
<x-input-label for="email" :value="__('Email')" />
|
|
||||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autocomplete="username" />
|
|
||||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Password -->
|
|
||||||
<div class="mt-4">
|
|
||||||
<x-input-label for="password" :value="__('Password')" />
|
|
||||||
|
|
||||||
<x-text-input id="password" class="block mt-1 w-full"
|
|
||||||
type="password"
|
|
||||||
name="password"
|
|
||||||
required autocomplete="new-password" />
|
|
||||||
|
|
||||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Confirm Password -->
|
|
||||||
<div class="mt-4">
|
|
||||||
<x-input-label for="password_confirmation" :value="__('Confirm Password')" />
|
|
||||||
|
|
||||||
<x-text-input id="password_confirmation" class="block mt-1 w-full"
|
|
||||||
type="password"
|
|
||||||
name="password_confirmation" required autocomplete="new-password" />
|
|
||||||
|
|
||||||
<x-input-error :messages="$errors->get('password_confirmation')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center justify-end mt-4">
|
|
||||||
<a class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800" href="{{ route('login') }}">
|
|
||||||
{{ __('Already registered?') }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<x-primary-button class="ml-4">
|
|
||||||
{{ __('Register') }}
|
|
||||||
</x-primary-button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</x-guest-layout>
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
<x-guest-layout>
|
|
||||||
<form method="POST" action="{{ route('password.store') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<!-- Password Reset Token -->
|
|
||||||
<input type="hidden" name="token" value="{{ $request->route('token') }}">
|
|
||||||
|
|
||||||
<!-- Email Address -->
|
|
||||||
<div>
|
|
||||||
<x-input-label for="email" :value="__('Email')" />
|
|
||||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email', $request->email)" required autofocus autocomplete="username" />
|
|
||||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Password -->
|
|
||||||
<div class="mt-4">
|
|
||||||
<x-input-label for="password" :value="__('Password')" />
|
|
||||||
<x-text-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="new-password" />
|
|
||||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Confirm Password -->
|
|
||||||
<div class="mt-4">
|
|
||||||
<x-input-label for="password_confirmation" :value="__('Confirm Password')" />
|
|
||||||
|
|
||||||
<x-text-input id="password_confirmation" class="block mt-1 w-full"
|
|
||||||
type="password"
|
|
||||||
name="password_confirmation" required autocomplete="new-password" />
|
|
||||||
|
|
||||||
<x-input-error :messages="$errors->get('password_confirmation')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center justify-end mt-4">
|
|
||||||
<x-primary-button>
|
|
||||||
{{ __('Reset Password') }}
|
|
||||||
</x-primary-button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</x-guest-layout>
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
<x-guest-layout>
|
|
||||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
|
||||||
{{ __('Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@if (session('status') == 'verification-link-sent')
|
|
||||||
<div class="mb-4 font-medium text-sm text-green-600 dark:text-green-400">
|
|
||||||
{{ __('A new verification link has been sent to the email address you provided during registration.') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="mt-4 flex items-center justify-between">
|
|
||||||
<form method="POST" action="{{ route('verification.send') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<x-primary-button>
|
|
||||||
{{ __('Resend Verification Email') }}
|
|
||||||
</x-primary-button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form method="POST" action="{{ route('logout') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<button type="submit" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">
|
|
||||||
{{ __('Log Out') }}
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</x-guest-layout>
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<svg viewBox="0 0 316 316" xmlns="http://www.w3.org/2000/svg" {{ $attributes }}>
|
|
||||||
<path d="M305.8 81.125C305.77 80.995 305.69 80.885 305.65 80.755C305.56 80.525 305.49 80.285 305.37 80.075C305.29 79.935 305.17 79.815 305.07 79.685C304.94 79.515 304.83 79.325 304.68 79.175C304.55 79.045 304.39 78.955 304.25 78.845C304.09 78.715 303.95 78.575 303.77 78.475L251.32 48.275C249.97 47.495 248.31 47.495 246.96 48.275L194.51 78.475C194.33 78.575 194.19 78.725 194.03 78.845C193.89 78.955 193.73 79.045 193.6 79.175C193.45 79.325 193.34 79.515 193.21 79.685C193.11 79.815 192.99 79.935 192.91 80.075C192.79 80.285 192.71 80.525 192.63 80.755C192.58 80.875 192.51 80.995 192.48 81.125C192.38 81.495 192.33 81.875 192.33 82.265V139.625L148.62 164.795V52.575C148.62 52.185 148.57 51.805 148.47 51.435C148.44 51.305 148.36 51.195 148.32 51.065C148.23 50.835 148.16 50.595 148.04 50.385C147.96 50.245 147.84 50.125 147.74 49.995C147.61 49.825 147.5 49.635 147.35 49.485C147.22 49.355 147.06 49.265 146.92 49.155C146.76 49.025 146.62 48.885 146.44 48.785L93.99 18.585C92.64 17.805 90.98 17.805 89.63 18.585L37.18 48.785C37 48.885 36.86 49.035 36.7 49.155C36.56 49.265 36.4 49.355 36.27 49.485C36.12 49.635 36.01 49.825 35.88 49.995C35.78 50.125 35.66 50.245 35.58 50.385C35.46 50.595 35.38 50.835 35.3 51.065C35.25 51.185 35.18 51.305 35.15 51.435C35.05 51.805 35 52.185 35 52.575V232.235C35 233.795 35.84 235.245 37.19 236.025L142.1 296.425C142.33 296.555 142.58 296.635 142.82 296.725C142.93 296.765 143.04 296.835 143.16 296.865C143.53 296.965 143.9 297.015 144.28 297.015C144.66 297.015 145.03 296.965 145.4 296.865C145.5 296.835 145.59 296.775 145.69 296.745C145.95 296.655 146.21 296.565 146.45 296.435L251.36 236.035C252.72 235.255 253.55 233.815 253.55 232.245V174.885L303.81 145.945C305.17 145.165 306 143.725 306 142.155V82.265C305.95 81.875 305.89 81.495 305.8 81.125ZM144.2 227.205L100.57 202.515L146.39 176.135L196.66 147.195L240.33 172.335L208.29 190.625L144.2 227.205ZM244.75 114.995V164.795L226.39 154.225L201.03 139.625V89.825L219.39 100.395L244.75 114.995ZM249.12 57.105L292.81 82.265L249.12 107.425L205.43 82.265L249.12 57.105ZM114.49 184.425L96.13 194.995V85.305L121.49 70.705L139.85 60.135V169.815L114.49 184.425ZM91.76 27.425L135.45 52.585L91.76 77.745L48.07 52.585L91.76 27.425ZM43.67 60.135L62.03 70.705L87.39 85.305V202.545V202.555V202.565C87.39 202.735 87.44 202.895 87.46 203.055C87.49 203.265 87.49 203.485 87.55 203.695V203.705C87.6 203.875 87.69 204.035 87.76 204.195C87.84 204.375 87.89 204.575 87.99 204.745C87.99 204.745 87.99 204.755 88 204.755C88.09 204.905 88.22 205.035 88.33 205.175C88.45 205.335 88.55 205.495 88.69 205.635L88.7 205.645C88.82 205.765 88.98 205.855 89.12 205.965C89.28 206.085 89.42 206.225 89.59 206.325C89.6 206.325 89.6 206.325 89.61 206.335C89.62 206.335 89.62 206.345 89.63 206.345L139.87 234.775V285.065L43.67 229.705V60.135ZM244.75 229.705L148.58 285.075V234.775L219.8 194.115L244.75 179.875V229.705ZM297.2 139.625L253.49 164.795V114.995L278.85 100.395L297.21 89.825V139.625H297.2Z"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.0 KiB |
|
|
@ -1,7 +0,0 @@
|
||||||
@props(['status'])
|
|
||||||
|
|
||||||
@if ($status)
|
|
||||||
<div {{ $attributes->merge(['class' => 'font-medium text-sm text-green-600 dark:text-green-400']) }}>
|
|
||||||
{{ $status }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-red-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-red-500 active:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150']) }}>
|
|
||||||
{{ $slot }}
|
|
||||||
</button>
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
<a {{ $attributes->merge(['class' => 'block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out']) }}>{{ $slot }}</a>
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white dark:bg-gray-700'])
|
|
||||||
|
|
||||||
@php
|
|
||||||
switch ($align) {
|
|
||||||
case 'left':
|
|
||||||
$alignmentClasses = 'origin-top-left left-0';
|
|
||||||
break;
|
|
||||||
case 'top':
|
|
||||||
$alignmentClasses = 'origin-top';
|
|
||||||
break;
|
|
||||||
case 'right':
|
|
||||||
default:
|
|
||||||
$alignmentClasses = 'origin-top-right right-0';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($width) {
|
|
||||||
case '48':
|
|
||||||
$width = 'w-48';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
|
|
||||||
<div @click="open = ! open">
|
|
||||||
{{ $trigger }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div x-show="open"
|
|
||||||
x-transition:enter="transition ease-out duration-200"
|
|
||||||
x-transition:enter-start="transform opacity-0 scale-95"
|
|
||||||
x-transition:enter-end="transform opacity-100 scale-100"
|
|
||||||
x-transition:leave="transition ease-in duration-75"
|
|
||||||
x-transition:leave-start="transform opacity-100 scale-100"
|
|
||||||
x-transition:leave-end="transform opacity-0 scale-95"
|
|
||||||
class="absolute z-50 mt-2 {{ $width }} rounded-md shadow-lg {{ $alignmentClasses }}"
|
|
||||||
style="display: none;"
|
|
||||||
@click="open = false">
|
|
||||||
<div class="rounded-md ring-1 ring-black ring-opacity-5 {{ $contentClasses }}">
|
|
||||||
{{ $content }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
@props(['messages'])
|
|
||||||
|
|
||||||
@if ($messages)
|
|
||||||
<ul {{ $attributes->merge(['class' => 'text-sm text-red-600 dark:text-red-400 space-y-1']) }}>
|
|
||||||
@foreach ((array) $messages as $message)
|
|
||||||
<li>{{ $message }}</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
@endif
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
@props(['value'])
|
|
||||||
|
|
||||||
<label {{ $attributes->merge(['class' => 'block font-medium text-sm text-gray-700 dark:text-gray-300']) }}>
|
|
||||||
{{ $value ?? $slot }}
|
|
||||||
</label>
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
@props([
|
|
||||||
'name',
|
|
||||||
'show' => false,
|
|
||||||
'maxWidth' => '2xl'
|
|
||||||
])
|
|
||||||
|
|
||||||
@php
|
|
||||||
$maxWidth = [
|
|
||||||
'sm' => 'sm:max-w-sm',
|
|
||||||
'md' => 'sm:max-w-md',
|
|
||||||
'lg' => 'sm:max-w-lg',
|
|
||||||
'xl' => 'sm:max-w-xl',
|
|
||||||
'2xl' => 'sm:max-w-2xl',
|
|
||||||
][$maxWidth];
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<div
|
|
||||||
x-data="{
|
|
||||||
show: @js($show),
|
|
||||||
focusables() {
|
|
||||||
// All focusable element types...
|
|
||||||
let selector = 'a, button, input:not([type=\'hidden\']), textarea, select, details, [tabindex]:not([tabindex=\'-1\'])'
|
|
||||||
return [...$el.querySelectorAll(selector)]
|
|
||||||
// All non-disabled elements...
|
|
||||||
.filter(el => ! el.hasAttribute('disabled'))
|
|
||||||
},
|
|
||||||
firstFocusable() { return this.focusables()[0] },
|
|
||||||
lastFocusable() { return this.focusables().slice(-1)[0] },
|
|
||||||
nextFocusable() { return this.focusables()[this.nextFocusableIndex()] || this.firstFocusable() },
|
|
||||||
prevFocusable() { return this.focusables()[this.prevFocusableIndex()] || this.lastFocusable() },
|
|
||||||
nextFocusableIndex() { return (this.focusables().indexOf(document.activeElement) + 1) % (this.focusables().length + 1) },
|
|
||||||
prevFocusableIndex() { return Math.max(0, this.focusables().indexOf(document.activeElement)) -1 },
|
|
||||||
}"
|
|
||||||
x-init="$watch('show', value => {
|
|
||||||
if (value) {
|
|
||||||
document.body.classList.add('overflow-y-hidden');
|
|
||||||
{{ $attributes->has('focusable') ? 'setTimeout(() => firstFocusable().focus(), 100)' : '' }}
|
|
||||||
} else {
|
|
||||||
document.body.classList.remove('overflow-y-hidden');
|
|
||||||
}
|
|
||||||
})"
|
|
||||||
x-on:open-modal.window="$event.detail == '{{ $name }}' ? show = true : null"
|
|
||||||
x-on:close.stop="show = false"
|
|
||||||
x-on:keydown.escape.window="show = false"
|
|
||||||
x-on:keydown.tab.prevent="$event.shiftKey || nextFocusable().focus()"
|
|
||||||
x-on:keydown.shift.tab.prevent="prevFocusable().focus()"
|
|
||||||
x-show="show"
|
|
||||||
class="fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50"
|
|
||||||
style="display: {{ $show ? 'block' : 'none' }};"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
x-show="show"
|
|
||||||
class="fixed inset-0 transform transition-all"
|
|
||||||
x-on:click="show = false"
|
|
||||||
x-transition:enter="ease-out duration-300"
|
|
||||||
x-transition:enter-start="opacity-0"
|
|
||||||
x-transition:enter-end="opacity-100"
|
|
||||||
x-transition:leave="ease-in duration-200"
|
|
||||||
x-transition:leave-start="opacity-100"
|
|
||||||
x-transition:leave-end="opacity-0"
|
|
||||||
>
|
|
||||||
<div class="absolute inset-0 bg-gray-500 dark:bg-gray-900 opacity-75"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
x-show="show"
|
|
||||||
class="mb-6 bg-white dark:bg-gray-800 rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full {{ $maxWidth }} sm:mx-auto"
|
|
||||||
x-transition:enter="ease-out duration-300"
|
|
||||||
x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
||||||
x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100"
|
|
||||||
x-transition:leave="ease-in duration-200"
|
|
||||||
x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100"
|
|
||||||
x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
||||||
>
|
|
||||||
{{ $slot }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
@props(['active'])
|
|
||||||
|
|
||||||
@php
|
|
||||||
$classes = ($active ?? false)
|
|
||||||
? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 dark:border-indigo-600 text-sm font-medium leading-5 text-gray-900 dark:text-gray-100 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out'
|
|
||||||
: 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-700 focus:outline-none focus:text-gray-700 dark:focus:text-gray-300 focus:border-gray-300 dark:focus:border-gray-700 transition duration-150 ease-in-out';
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
|
||||||
{{ $slot }}
|
|
||||||
</a>
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 dark:bg-gray-200 border border-transparent rounded-md font-semibold text-xs text-white dark:text-gray-800 uppercase tracking-widest hover:bg-gray-700 dark:hover:bg-white focus:bg-gray-700 dark:focus:bg-white active:bg-gray-900 dark:active:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150']) }}>
|
|
||||||
{{ $slot }}
|
|
||||||
</button>
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
@props(['active'])
|
|
||||||
|
|
||||||
@php
|
|
||||||
$classes = ($active ?? false)
|
|
||||||
? 'block w-full pl-3 pr-4 py-2 border-l-4 border-indigo-400 dark:border-indigo-600 text-left text-base font-medium text-indigo-700 dark:text-indigo-300 bg-indigo-50 dark:bg-indigo-900/50 focus:outline-none focus:text-indigo-800 dark:focus:text-indigo-200 focus:bg-indigo-100 dark:focus:bg-indigo-900 focus:border-indigo-700 dark:focus:border-indigo-300 transition duration-150 ease-in-out'
|
|
||||||
: 'block w-full pl-3 pr-4 py-2 border-l-4 border-transparent text-left text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-gray-700 focus:border-gray-300 dark:focus:border-gray-600 transition duration-150 ease-in-out';
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<a {{ $attributes->merge(['class' => $classes]) }}>
|
|
||||||
{{ $slot }}
|
|
||||||
</a>
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<button {{ $attributes->merge(['type' => 'button', 'class' => 'inline-flex items-center px-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-500 rounded-md font-semibold text-xs text-gray-700 dark:text-gray-300 uppercase tracking-widest shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 disabled:opacity-25 transition ease-in-out duration-150']) }}>
|
|
||||||
{{ $slot }}
|
|
||||||
</button>
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
@props(['disabled' => false])
|
|
||||||
|
|
||||||
<input {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm']) !!}>
|
|
||||||
|
|
@ -1,36 +1,25 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>EU Turkmenistan</title>
|
||||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<link rel="stylesheet" href="{{ asset('css/main.css') }}">
|
||||||
<!-- Fonts -->
|
|
||||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
|
||||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
|
||||||
|
|
||||||
<!-- Scripts -->
|
|
||||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
|
||||||
</head>
|
</head>
|
||||||
<body class="font-sans antialiased">
|
<body class="bg-gray-100" style="height:max-content; min-height: 100%">
|
||||||
<div class="min-h-screen bg-gray-100 dark:bg-gray-900">
|
<div class="bg-blue-900">
|
||||||
@include('layouts.navigation')
|
<div class="flex px-6 items-center">
|
||||||
|
<a href="/">
|
||||||
<!-- Page Heading -->
|
<svg xmlns="http://www.w3.org/2000/svg" style="width: 100px" viewBox="0 0 192.756 192.756"><g fill-rule="evenodd" clip-rule="evenodd"><path fill="#fff" fill-opacity="0" d="M0 0h192.756v192.756H0V0z"/><path fill="#224b8c" stroke="#000" stroke-width=".497" stroke-miterlimit="2.613" d="M184.252 149.25V43.506H8.504V149.25h175.748z"/><path fill="#f2ca30" d="M96.798 56.567l.968 2.822h2.949l-2.35 1.815.854 2.829-2.421-1.688-2.421 1.688.854-2.828-2.351-1.816h2.95l.968-2.822zM96.798 127.154l.968 2.821h2.949l-2.35 1.816.854 2.828-2.421-1.687-2.421 1.687.854-2.828-2.351-1.816h2.95l.968-2.821zM131.824 91.511l.967 2.822h2.949l-2.349 1.814.853 2.83-2.42-1.688-2.422 1.688.854-2.829-2.35-1.815h2.949l.969-2.822zM61.587 91.511l.968 2.822h2.95l-2.351 1.814.854 2.83-2.421-1.688-2.421 1.688.854-2.829-2.351-1.815h2.95l.968-2.822z"/><path fill="#f2ca30" d="M96.798 56.567l.968 2.822h2.949l-2.35 1.815.854 2.829-2.421-1.688-2.421 1.688.854-2.828-2.351-1.816h2.95l.968-2.822zM65.019 75.168l.968 2.822h2.949l-2.351 1.815.855 2.829-2.421-1.688-2.421 1.688.854-2.829-2.351-1.815h2.949l.969-2.822zM65.919 108.891l.968 2.822h2.949l-2.35 1.814.854 2.828-2.421-1.687-2.421 1.687.854-2.828-2.351-1.814h2.95l.968-2.822zM77.998 61.418l.968 2.822h2.95l-2.351 1.815.854 2.829-2.421-1.688-2.421 1.688.854-2.829-2.351-1.815h2.949l.969-2.822zM77.998 121.928l.968 2.82h2.95l-2.351 1.816.854 2.829-2.421-1.688-2.421 1.688.854-2.829-2.351-1.816h2.949l.969-2.82zM128.402 75.168l-.968 2.822h-2.95l2.352 1.815-.856 2.829 2.422-1.688 2.422 1.688-.855-2.829 2.351-1.815h-2.949l-.969-2.822zM128.402 108.828l-.968 2.822h-2.95l2.352 1.815-.856 2.828 2.422-1.688 2.422 1.69-.855-2.83 2.351-1.815h-2.949l-.969-2.822zM115.424 61.418l-.969 2.822h-2.949l2.349 1.815-.853 2.829 2.422-1.688 2.42 1.688-.854-2.829 2.352-1.815h-2.949l-.969-2.822zM115.424 121.375l-.969 2.822h-2.949l2.349 1.815-.853 2.83 2.422-1.69 2.42 1.69-.854-2.83 2.352-1.815h-2.949l-.969-2.822zM96.798 127.154l.968 2.821h2.949l-2.35 1.816.854 2.828-2.421-1.687-2.421 1.687.854-2.828-2.351-1.816h2.95l.968-2.821zM131.824 91.511l.967 2.822h2.949l-2.349 1.814.853 2.83-2.42-1.688-2.422 1.688.854-2.829-2.35-1.815h2.949l.969-2.822zM61.587 91.511l.968 2.822h2.95l-2.351 1.814.854 2.83-2.421-1.688-2.421 1.688.854-2.829-2.351-1.815h2.95l.968-2.822z"/></g></svg>
|
||||||
@if (isset($header))
|
</a>
|
||||||
<header class="bg-white dark:bg-gray-800 shadow">
|
<h1 class="font-extrabold text-3xl md:text-4xl">
|
||||||
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
<span class="text-gray-50"> EU Turkmenistan</span>
|
||||||
{{ $header }}
|
<span class="text-blue-500"> - upcoming events</span>
|
||||||
</div>
|
</h1>
|
||||||
</header>
|
</div>
|
||||||
@endif
|
|
||||||
|
|
||||||
<!-- Page Content -->
|
|
||||||
<main>
|
|
||||||
{{ $slot }}
|
|
||||||
</main>
|
|
||||||
</div>
|
</div>
|
||||||
|
@yield('content')
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
<x-app-layout>
|
|
||||||
<x-slot name="header">
|
|
||||||
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
|
||||||
{{ __('Profile') }}
|
|
||||||
</h2>
|
|
||||||
</x-slot>
|
|
||||||
|
|
||||||
<div class="py-12">
|
|
||||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
|
||||||
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
||||||
<div class="max-w-xl">
|
|
||||||
@include('profile.partials.update-profile-information-form')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
||||||
<div class="max-w-xl">
|
|
||||||
@include('profile.partials.update-password-form')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
||||||
<div class="max-w-xl">
|
|
||||||
@include('profile.partials.delete-user-form')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</x-app-layout>
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
<section class="space-y-6">
|
|
||||||
<header>
|
|
||||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
||||||
{{ __('Delete Account') }}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
||||||
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.') }}
|
|
||||||
</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<x-danger-button
|
|
||||||
x-data=""
|
|
||||||
x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')"
|
|
||||||
>{{ __('Delete Account') }}</x-danger-button>
|
|
||||||
|
|
||||||
<x-modal name="confirm-user-deletion" :show="$errors->userDeletion->isNotEmpty()" focusable>
|
|
||||||
<form method="post" action="{{ route('profile.destroy') }}" class="p-6">
|
|
||||||
@csrf
|
|
||||||
@method('delete')
|
|
||||||
|
|
||||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
||||||
{{ __('Are you sure you want to delete your account?') }}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
||||||
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="mt-6">
|
|
||||||
<x-input-label for="password" value="{{ __('Password') }}" class="sr-only" />
|
|
||||||
|
|
||||||
<x-text-input
|
|
||||||
id="password"
|
|
||||||
name="password"
|
|
||||||
type="password"
|
|
||||||
class="mt-1 block w-3/4"
|
|
||||||
placeholder="{{ __('Password') }}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<x-input-error :messages="$errors->userDeletion->get('password')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-6 flex justify-end">
|
|
||||||
<x-secondary-button x-on:click="$dispatch('close')">
|
|
||||||
{{ __('Cancel') }}
|
|
||||||
</x-secondary-button>
|
|
||||||
|
|
||||||
<x-danger-button class="ml-3">
|
|
||||||
{{ __('Delete Account') }}
|
|
||||||
</x-danger-button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</x-modal>
|
|
||||||
</section>
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
<section>
|
|
||||||
<header>
|
|
||||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
||||||
{{ __('Update Password') }}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
||||||
{{ __('Ensure your account is using a long, random password to stay secure.') }}
|
|
||||||
</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<form method="post" action="{{ route('password.update') }}" class="mt-6 space-y-6">
|
|
||||||
@csrf
|
|
||||||
@method('put')
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<x-input-label for="current_password" :value="__('Current Password')" />
|
|
||||||
<x-text-input id="current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
|
|
||||||
<x-input-error :messages="$errors->updatePassword->get('current_password')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<x-input-label for="password" :value="__('New Password')" />
|
|
||||||
<x-text-input id="password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
|
|
||||||
<x-input-error :messages="$errors->updatePassword->get('password')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<x-input-label for="password_confirmation" :value="__('Confirm Password')" />
|
|
||||||
<x-text-input id="password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
|
|
||||||
<x-input-error :messages="$errors->updatePassword->get('password_confirmation')" class="mt-2" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center gap-4">
|
|
||||||
<x-primary-button>{{ __('Save') }}</x-primary-button>
|
|
||||||
|
|
||||||
@if (session('status') === 'password-updated')
|
|
||||||
<p
|
|
||||||
x-data="{ show: true }"
|
|
||||||
x-show="show"
|
|
||||||
x-transition
|
|
||||||
x-init="setTimeout(() => show = false, 2000)"
|
|
||||||
class="text-sm text-gray-600 dark:text-gray-400"
|
|
||||||
>{{ __('Saved.') }}</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
<section>
|
|
||||||
<header>
|
|
||||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
||||||
{{ __('Profile Information') }}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
||||||
{{ __("Update your account's profile information and email address.") }}
|
|
||||||
</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<form id="send-verification" method="post" action="{{ route('verification.send') }}">
|
|
||||||
@csrf
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form method="post" action="{{ route('profile.update') }}" class="mt-6 space-y-6">
|
|
||||||
@csrf
|
|
||||||
@method('patch')
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<x-input-label for="name" :value="__('Name')" />
|
|
||||||
<x-text-input id="name" name="name" type="text" class="mt-1 block w-full" :value="old('name', $user->name)" required autofocus autocomplete="name" />
|
|
||||||
<x-input-error class="mt-2" :messages="$errors->get('name')" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<x-input-label for="email" :value="__('Email')" />
|
|
||||||
<x-text-input id="email" name="email" type="email" class="mt-1 block w-full" :value="old('email', $user->email)" required autocomplete="username" />
|
|
||||||
<x-input-error class="mt-2" :messages="$errors->get('email')" />
|
|
||||||
|
|
||||||
@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && ! $user->hasVerifiedEmail())
|
|
||||||
<div>
|
|
||||||
<p class="text-sm mt-2 text-gray-800 dark:text-gray-200">
|
|
||||||
{{ __('Your email address is unverified.') }}
|
|
||||||
|
|
||||||
<button form="send-verification" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">
|
|
||||||
{{ __('Click here to re-send the verification email.') }}
|
|
||||||
</button>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
@if (session('status') === 'verification-link-sent')
|
|
||||||
<p class="mt-2 font-medium text-sm text-green-600 dark:text-green-400">
|
|
||||||
{{ __('A new verification link has been sent to your email address.') }}
|
|
||||||
</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center gap-4">
|
|
||||||
<x-primary-button>{{ __('Save') }}</x-primary-button>
|
|
||||||
|
|
||||||
@if (session('status') === 'profile-updated')
|
|
||||||
<p
|
|
||||||
x-data="{ show: true }"
|
|
||||||
x-show="show"
|
|
||||||
x-transition
|
|
||||||
x-init="setTimeout(() => show = false, 2000)"
|
|
||||||
class="text-sm text-gray-600 dark:text-gray-400"
|
|
||||||
>{{ __('Saved.') }}</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div style="display:flex; justify-content: center; align-items: center; min-height: 100%; width: 100%">
|
||||||
|
<form class="p-4" action="/submit" method="post" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" value="{{ $event_id }}" name="event_id">
|
||||||
|
|
||||||
|
<label for="name">Name <span class="text-red-600">*</span></label>
|
||||||
|
<input type="text" id="name" name="name" required>
|
||||||
|
|
||||||
|
<label for="name">Surname <span class="text-red-600">*</span></label>
|
||||||
|
<input type="text" id="surname" name="surname">
|
||||||
|
|
||||||
|
<label for="email">Email <span class="text-red-600">*</span></label>
|
||||||
|
<input type="email" id="mail" name="email">
|
||||||
|
|
||||||
|
<label for="name">Organization <span class="text-red-600">*</span></label>
|
||||||
|
<input type="text" id="name" name="ogranization">
|
||||||
|
|
||||||
|
|
||||||
|
<input type="checkbox" id="is_attending" name="is_attending" checked>
|
||||||
|
<label class="light" for="is_attending">I will attend the event</label>
|
||||||
|
<input type="checkbox" id="consent_form" name="consent_form" checked>
|
||||||
|
<label class="light" for="consent_form">I give consent for making photos</label><br>
|
||||||
|
|
||||||
|
<label for="file" class="flex flex-col items-center justify-center border-4 border-gray-300 border-dashed rounded h-36 px-6 text-lg text-gray-600 focus:outline-none focus:ring focus:border-blue-300 cursor-pointer"" autocomplete="off">
|
||||||
|
<svg class="w-8 h-8 text-gray-600
|
||||||
|
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"/></svg>
|
||||||
|
<span id="choose_btn" class="mt-2 text-base leading-normal text-blue-500 font-bold">Choose file</span><br/>
|
||||||
|
<span id="filename" class="mt-2 text-base leading-normal text-dark-500 font-bold"></span>
|
||||||
|
<input type="file" id="file" name="file" class="hidden"/>
|
||||||
|
</label>
|
||||||
|
<p class="py-2 text-gray-400">Upload types: png | jpg | pdf </p>
|
||||||
|
|
||||||
|
<button class="p-2 bg-blue-700 text-gray-100 mb-2" type="submit">Sign Up</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
document.getElementById('file').onchange = function () {
|
||||||
|
var filename = this.value.replace(/.*[\/\\]/, '');
|
||||||
|
document.getElementById('choose_btn').innerText = "Click here to choose another file";
|
||||||
|
document.getElementById('filename').innerText = filename;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="flex justify-center items-center">
|
||||||
|
<div class="max-w-lg mt-4 rounded p-4 bg-green-200 border-green-500 border-2">
|
||||||
|
<h1 class="text-6xl text-green-600 font-bold">Thank you!</h1><br/>
|
||||||
|
<span class="text-base text-green-600 font-medium">We have sent you an email with attached QR code which you should use for this event! Check you email, if you haven't received anything contact us via: example@example.com</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
@ -1,2 +1,15 @@
|
||||||
{{-- This file is used to store sidebar items, inside the Backpack admin panel --}}
|
{{-- This file is used to store sidebar items, inside the Backpack admin panel --}}
|
||||||
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('dashboard') }}"><i class="la la-home nav-icon"></i> {{ trans('backpack::base.dashboard') }}</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('dashboard') }}"><i class="la la-home nav-icon"></i> {{ trans('backpack::base.dashboard') }}</a></li>
|
||||||
|
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('event') }}"><i class="nav-icon la la-calendar"></i> Events</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('attender') }}"><i class="nav-icon la la-user"></i> Attenders</a></li>
|
||||||
|
|
||||||
|
<!-- Users, Roles, Permissions -->
|
||||||
|
<li class="nav-item nav-dropdown">
|
||||||
|
<a class="nav-link nav-dropdown-toggle" href="#"><i class="nav-icon la la-users"></i> Authentication</a>
|
||||||
|
<ul class="nav-dropdown-items">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('user') }}"><i class="nav-icon la la-user"></i> <span>Users</span></a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('role') }}"><i class="nav-icon la la-id-badge"></i> <span>Roles</span></a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('permission') }}"><i class="nav-icon la la-key"></i> <span>Permissions</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -16,4 +16,6 @@
|
||||||
),
|
),
|
||||||
'namespace' => 'App\Http\Controllers\Admin',
|
'namespace' => 'App\Http\Controllers\Admin',
|
||||||
], function () { // custom admin routes
|
], function () { // custom admin routes
|
||||||
}); // this should be the absolute last line of this file
|
Route::crud('event', 'EventCrudController');
|
||||||
|
Route::crud('attender', 'AttenderCrudController');
|
||||||
|
}); // this should be the absolute last line of this file
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Http\Controllers\HomeController;
|
||||||
use App\Http\Controllers\ProfileController;
|
use App\Http\Controllers\ProfileController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
|
@ -14,20 +15,12 @@
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', [HomeController::class, 'index']);
|
||||||
return view('welcome');
|
Route::get('/apply-for-event/{id}', [HomeController::class, 'apply']);
|
||||||
});
|
Route::post('/submit',[HomeController::class, 'submit']);
|
||||||
|
Route::view('thank', 'success');
|
||||||
|
|
||||||
Route::view('scan', 'scan');
|
Route::view('scan', 'scan');
|
||||||
|
|
||||||
Route::get('/dashboard', function () {
|
|
||||||
return view('dashboard');
|
|
||||||
})->middleware(['auth', 'verified'])->name('dashboard');
|
|
||||||
|
|
||||||
Route::middleware('auth')->group(function () {
|
|
||||||
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
|
||||||
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
|
||||||
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
|
|
||||||
});
|
|
||||||
|
|
||||||
require __DIR__.'/auth.php';
|
require __DIR__.'/auth.php';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue