Skip to content

Instantly share code, notes, and snippets.

Adel adelf

Block or report user

Report or block adelf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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
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 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 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
You can’t perform that action at this time.