Skip to content

Instantly share code, notes, and snippets.

View seshac's full-sized avatar
🎯
Focusing

Sesha seshac

🎯
Focusing
View GitHub Profile
@seshac
seshac / open-closed-principle.php
Created October 30, 2022 15:56
Open Closed Principle - PHP
<?php
// Open Closed Principle Violation
class Programmer
{
public function work()
{
return 'coding';
}
}
@seshac
seshac / RouteServiceProvider.php
Created February 4, 2020 07:54
Separating group of routes based on laravel core
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Redis;
use Log;
use Auth;
@seshac
seshac / ActivityLogController.php
Last active December 20, 2019 15:45
Extend controller functionality with Repository .
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Repositories\UserRepository;
use App\Repositories\ActivityLogRepository;
class ActivityLogController extends Controller
{