Skip to content

Instantly share code, notes, and snippets.

View ericamigo's full-sized avatar
🏠
Working from home

Eric Amigo ericamigo

🏠
Working from home
View GitHub Profile
<?php
use App\Models\Location;
use App\Models\LocationCategory;
/**
* -------------------------------------------------------------------------
* Get location categories
* -------------------------------------------------------------------------
*/
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CustomValidationRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
@ericamigo
ericamigo / gist:5556a47e11bf37c99d02d0fccc325721
Created February 20, 2021 15:28 — forked from frzsombor/gist:ddd0e11f93885060ef35
Share Laravel's session and check authentication from external projects
<?php
/*
|--------------------------------------------------------------------------
| Sharing Laravel's session and checking authentication
|--------------------------------------------------------------------------
|
| Use the following code in any CMS (WordPress, Joomla, etc), filemanager (CKFinder,
| KCFinder, simogeos's Filemanager, etc), or any other non-Laravel project to boot into
| the Laravel framework, with session support, and check if the user is authenticated.