Skip to content

Instantly share code, notes, and snippets.

View web.php
Route::group(['middleware' => 'guest'], function(){
Route::get('login', 'AuthController@getLogin');
Route::get('auth/google', 'AuthController@getAuth');
Route::get('auth/google/callback', 'AuthController@getCallback');
Route::get('auth/denied', 'AuthController@getDenied');
});
Route::group(['middleware' => 'auth'], function () {
// all other app routes here
View CourseOpener.php
<?php
namespace App\Domain\Courses;
use App\Domain\Courses\Exam\ExamQuestion;
use App\Domain\Courses\Exam\ExamVersion;
use App\Exceptions\Courses\CourseCannotBeOpened;
class CourseOpener
{
View CustomViewCompiler.php
<?php
namespace App\Services;
use App\Contracts\IConferenceService;
use Symfony\Component\Debug\Exception\FatalThrowableError;
class CustomViewCompiler
{
public function getBladeResult($name, $bladeContents, array $data = [], $flushCache = false)
View useless_eloquent_repository.php
<?php
/**
* Example of useless Repository abstraction for Eloquent.
* From "Architecture of complex web applications" book.
* https://adelf.tech/2019/architecture-of-complex-web-applications
*/
interface PollRepository
{
//... some other actions
You can’t perform that action at this time.