repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Modules/Auth/Controllers/RegisterController.php | app/Modules/Auth/Controllers/RegisterController.php | <?php
namespace App\Modules\Auth\Controllers;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class Register... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Contracts/RepositoryInterface.php | app/Contracts/RepositoryInterface.php | <?php
namespace App\Contracts;
use Illuminate\Database\Eloquent\Model;
/**
* Interface RepositoryInterface.
*/
interface RepositoryInterface
{
/**
* @param int $id
* @return Model|null
*/
public function get(int $id): ?Model;
/**
* @param array $data
* @return Model|null
... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Notifications/VerifyEmail.php | app/Notifications/VerifyEmail.php | <?php
namespace App\Notifications;
use Carbon\Carbon;
use Illuminate\Auth\Notifications\VerifyEmail as Notification;
use Illuminate\Support\Facades\URL;
class VerifyEmail extends Notification
{
/**
* Get the verification URL for the given notifiable.
*
* @param mixed $notifiable
* @return s... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Notifications/ResetPassword.php | app/Notifications/ResetPassword.php | <?php
namespace App\Notifications;
use Illuminate\Auth\Notifications\ResetPassword as Notification;
use Illuminate\Notifications\Messages\MailMessage;
class ResetPassword extends Notification
{
/**
* Build the mail representation of the notification.
*
* @param mixed $notifiable
* @return \... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Console/Kernel.php | app/Console/Kernel.php | <?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Console/Commands/MakeBackEndModule.php | app/Console/Commands/MakeBackEndModule.php | <?php
namespace App\Console\Commands;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Output\ConsoleOutput;
class MakeBackEndModule extends MakeModuleCommand
{
/**
* MakeBackEndModule constructor.
*/
public function __co... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Console/Commands/MakeModuleCommand.php | app/Console/Commands/MakeModuleCommand.php | <?php
namespace App\Console\Commands;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Str;
use Illuminate\Support\Stringable;
class MakeModuleCommand extends Comm... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Console/Commands/MakeFrontEndModule.php | app/Console/Commands/MakeFrontEndModule.php | <?php
namespace App\Console\Commands;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Output\ConsoleOutput;
class MakeFrontEndModule extends MakeModuleCommand
{
/**
* MakeFrontEndModule constructor.
*/
public function __... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Models/User.php | app/Models/User.php | <?php
namespace App\Models;
use App\Notifications\ResetPassword;
use App\Notifications\VerifyEmail;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Models/PersonalAccessToken.php | app/Models/PersonalAccessToken.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Laravel\Sanctum\PersonalAccessToken as SanctumPersonalAccessToken;
class PersonalAccessToken extends SanctumPersonalAccessToken
{
use HasFactory;
const TABLE_NAME = 'personal_access_tokens';
const COLUMN_ID = 'id';
... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Repositories/UserRepository.php | app/Repositories/UserRepository.php | <?php
namespace App\Repositories;
use App\Models\User;
class UserRepository extends AbstractRepository
{
/**
* @var string
*/
protected $class = User::class;
}
| php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Repositories/AbstractRepository.php | app/Repositories/AbstractRepository.php | <?php
namespace App\Repositories;
use App\Contracts\RepositoryInterface;
use Illuminate\Database\Eloquent\Model;
class AbstractRepository implements RepositoryInterface
{
/**
* @var string
*/
protected $class;
/**
* @var Model
*/
protected $model;
/**
* AbstractReposito... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Providers/BroadcastServiceProvider.php | app/Providers/BroadcastServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes(['... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Providers/RouteServiceProvider.php | app/Providers/RouteServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as th... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Providers/EventServiceProvider.php | app/Providers/EventServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider
{
/*... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Providers/AppServiceProvider.php | app/Providers/AppServiceProvider.php | <?php
namespace App\Providers;
use App\Models\PersonalAccessToken;
use Illuminate\Support\ServiceProvider;
use Laravel\Sanctum\Sanctum;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/app/Providers/AuthServiceProvider.php | app/Providers/AuthServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
// 'App\Model' => 'App\Po... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/bootstrap/app.php | bootstrap/app.php | <?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of La... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/tests/TestCase.php | tests/TestCase.php | <?php
namespace Tests;
use App\Models\User;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Laravel\Sanctum\Sanctum;
abstract class TestCase extends BaseTestCase
{
use RefreshDatabase;
use Create... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/tests/CreatesApplication.php | tests/CreatesApplication.php | <?php
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Application;
trait CreatesApplication
{
/**
* Creates the application.
*
* @return Application
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/tests/Feature/VerificationTest.php | tests/Feature/VerificationTest.php | <?php
namespace Tests\Feature;
use App\Models\User;
use App\Notifications\VerifyEmail;
use Illuminate\Auth\Events\Verified;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Notification;
use Illuminate\Support\Facades\URL;
use Tests\TestCase;
class VerificationTest extends TestCase
{
/** @tes... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/tests/Feature/RegisterTest.php | tests/Feature/RegisterTest.php | <?php
namespace Tests\Feature;
use App\Models\User;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Tests\TestCase;
class RegisterTest extends TestCase
{
/** @test */
public function can_register()
{
$response = $this->postJson(route('register'), [
User::COLUMN_NAME => 'Test User',... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/tests/Feature/LoginTest.php | tests/Feature/LoginTest.php | <?php
namespace Tests\Feature;
use App\Models\PersonalAccessToken;
use App\Models\User;
use Illuminate\Support\Facades\Config;
use Tests\TestCase;
class LoginTest extends TestCase
{
/** @var User */
protected $user;
public function setUp(): void
{
parent::setUp();
$this->user = User... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/tests/Feature/SettingsTest.php | tests/Feature/SettingsTest.php | <?php
namespace Tests\Feature;
use App\Http\Controllers\Controller;
use App\Models\User;
use Tests\TestCase;
class SettingsTest extends TestCase
{
/** @var User */
protected $user;
public function setUp(): void
{
parent::setUp();
$this->user = User::factory()->create();
}
/... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/tests/Unit/ExampleTest.php | tests/Unit/ExampleTest.php | <?php
namespace Tests\Unit;
use PHPUnit\Framework\TestCase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$this->assertTrue(true);
}
}
| php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/routes/web.php | routes/web.php | <?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/routes/channels.php | routes/channels.php | <?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callba... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/routes/api.php | routes/api.php | <?php
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/routes/console.php | routes/console.php | <?php
/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| ... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/public/index.php | public/index.php | <?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|------------------------------------... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/app.php | config/app.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to plac... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/logging.php | config/logging.php | <?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/session.php | config/session.php | <?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be use... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/queue.php | config/queue.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving y... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/jwt.php | config/jwt.php | <?php
/*
* This file is part of jwt-auth.
*
* (c) Sean Tymon <tymon148@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [
/*
|--------------------------------------------------------------------------
... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/cache.php | config/cache.php | <?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used whil... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/hashing.php | config/hashing.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your ap... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/view.php | config/view.php | <?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/database.php | config/database.php | <?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections b... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/services.php | config/services.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/filesystems.php | config/filesystems.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. T... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/mail.php | config/mail.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may s... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/broadcasting.php | config/broadcasting.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an even... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/auth.php | config/auth.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for y... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/config/sanctum.php | config/sanctum.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Stateful Domains
|--------------------------------------------------------------------------
|
| Requests from the following domains / hosts will receive stateful API
| authentication cookies. T... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/database/factories/UserFactory.php | database/factories/UserFactory.php | <?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class UserFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = User::class;
/**
... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/database/migrations/2014_10_12_000000_create_users_table.php | database/migrations/2014_10_12_000000_create_users_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function ... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/database/migrations/2014_10_12_100000_create_password_resets_table.php | database/migrations/2014_10_12_100000_create_password_resets_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/database/migrations/2019_08_19_000000_create_failed_jobs_table.php | database/migrations/2019_08_19_000000_create_failed_jobs_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs'... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php | database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePersonalAccessTokensTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pe... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/database/seeders/DatabaseSeeder.php | database/seeders/DatabaseSeeder.php | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
// $this->call(UsersTableSeeder::class);
}
}
| php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/resources/lang/en/passwords.php | resources/lang/en/passwords.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are gi... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/resources/lang/en/verification.php | resources/lang/en/verification.php | <?php
return [
'verified' => 'Your email has been verified!',
'invalid' => 'The verification link is invalid.',
'already_verified' => 'The email is already verified.',
'user' => 'We can\'t find a user with that e-mail address.',
'sent' => 'We have e-mailed your verification link!',
];
| php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/resources/lang/en/pagination.php | resources/lang/en/pagination.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pag... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/resources/lang/en/validation.php | resources/lang/en/validation.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator ... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/resources/lang/en/auth.php | resources/lang/en/auth.php | <?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages t... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
Yurich84/laravel-vue-spa-skeleton | https://github.com/Yurich84/laravel-vue-spa-skeleton/blob/fed0b2fa6ea26a0ee17858d67117a8b6639531f9/resources/views/spa.blade.php | resources/views/spa.blade.php | <!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name') }}</title>
<link... | php | MIT | fed0b2fa6ea26a0ee17858d67117a8b6639531f9 | 2026-01-05T04:20:20.402310Z | false |
rollerworks/PasswordStrengthValidator | https://github.com/rollerworks/PasswordStrengthValidator/blob/bb23ea35001329dccb90b0b7ca43a4f6b1eedef2/.php-cs-fixer.dist.php | .php-cs-fixer.dist.php | <?php
$header = <<<EOF
This file is part of the RollerworksPasswordStrengthValidator package.
(c) Sebastiaan Stok <s.stok@rollerscapes.net>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
/** @var \Symfony\Component\Finder\Finder $finder */
$finder = Ph... | php | MIT | bb23ea35001329dccb90b0b7ca43a4f6b1eedef2 | 2026-01-05T04:20:26.312334Z | false |
rollerworks/PasswordStrengthValidator | https://github.com/rollerworks/PasswordStrengthValidator/blob/bb23ea35001329dccb90b0b7ca43a4f6b1eedef2/src/Validator/Constraints/PasswordStrength.php | src/Validator/Constraints/PasswordStrength.php | <?php
declare(strict_types=1);
/*
* This file is part of the RollerworksPasswordStrengthValidator package.
*
* (c) Sebastiaan Stok <s.stok@rollerscapes.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Rollerworks\Component\Passwo... | php | MIT | bb23ea35001329dccb90b0b7ca43a4f6b1eedef2 | 2026-01-05T04:20:26.312334Z | false |
rollerworks/PasswordStrengthValidator | https://github.com/rollerworks/PasswordStrengthValidator/blob/bb23ea35001329dccb90b0b7ca43a4f6b1eedef2/src/Validator/Constraints/PasswordStrengthValidator.php | src/Validator/Constraints/PasswordStrengthValidator.php | <?php
declare(strict_types=1);
/*
* This file is part of the RollerworksPasswordStrengthValidator package.
*
* (c) Sebastiaan Stok <s.stok@rollerscapes.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Rollerworks\Component\Passwo... | php | MIT | bb23ea35001329dccb90b0b7ca43a4f6b1eedef2 | 2026-01-05T04:20:26.312334Z | false |
rollerworks/PasswordStrengthValidator | https://github.com/rollerworks/PasswordStrengthValidator/blob/bb23ea35001329dccb90b0b7ca43a4f6b1eedef2/src/Validator/Constraints/PasswordRequirements.php | src/Validator/Constraints/PasswordRequirements.php | <?php
declare(strict_types=1);
/*
* This file is part of the RollerworksPasswordStrengthValidator package.
*
* (c) Sebastiaan Stok <s.stok@rollerscapes.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Rollerworks\Component\Passwo... | php | MIT | bb23ea35001329dccb90b0b7ca43a4f6b1eedef2 | 2026-01-05T04:20:26.312334Z | false |
rollerworks/PasswordStrengthValidator | https://github.com/rollerworks/PasswordStrengthValidator/blob/bb23ea35001329dccb90b0b7ca43a4f6b1eedef2/src/Validator/Constraints/PasswordRequirementsValidator.php | src/Validator/Constraints/PasswordRequirementsValidator.php | <?php
declare(strict_types=1);
/*
* This file is part of the RollerworksPasswordStrengthValidator package.
*
* (c) Sebastiaan Stok <s.stok@rollerscapes.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Rollerworks\Component\Passwo... | php | MIT | bb23ea35001329dccb90b0b7ca43a4f6b1eedef2 | 2026-01-05T04:20:26.312334Z | false |
rollerworks/PasswordStrengthValidator | https://github.com/rollerworks/PasswordStrengthValidator/blob/bb23ea35001329dccb90b0b7ca43a4f6b1eedef2/tests/Validator/PasswordRequirementsValidatorTest.php | tests/Validator/PasswordRequirementsValidatorTest.php | <?php
declare(strict_types=1);
/*
* This file is part of the RollerworksPasswordStrengthValidator package.
*
* (c) Sebastiaan Stok <s.stok@rollerscapes.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Rollerworks\Component\Passwo... | php | MIT | bb23ea35001329dccb90b0b7ca43a4f6b1eedef2 | 2026-01-05T04:20:26.312334Z | false |
rollerworks/PasswordStrengthValidator | https://github.com/rollerworks/PasswordStrengthValidator/blob/bb23ea35001329dccb90b0b7ca43a4f6b1eedef2/tests/Validator/PasswordStrengthTest.php | tests/Validator/PasswordStrengthTest.php | <?php
declare(strict_types=1);
/*
* This file is part of the RollerworksPasswordStrengthValidator package.
*
* (c) Sebastiaan Stok <s.stok@rollerscapes.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Rollerworks\Component\Passwo... | php | MIT | bb23ea35001329dccb90b0b7ca43a4f6b1eedef2 | 2026-01-05T04:20:26.312334Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/newObject.php | Creational/newObject.php | <?php
$object = new Foo(); | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Builder/Client.php | Creational/Builder/Client.php | <?php
// Client code
function clientCode(): void
{
// Create a new director
$director = new BurgerDirector();
// Create a basic burger builder
$basicBuilder = new BasicBurgerBuilder();
// Set the builder for the director
$director->setBuilder($basicBuilder);
// Build the burger
$basi... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Builder/BurgerBuilder.php | Creational/Builder/BurgerBuilder.php | <?php
// Builder interface
interface BurgerBuilder {
public function addBun();
public function addPatty();
public function addCheese();
public function addToppings();
public function getBurger(): Burger;
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Builder/Burger.php | Creational/Builder/Burger.php | <?php
// Product
class Burger {
private string $bun;
private string $patty;
private string $cheese;
private array $toppings;
public function setBun(string $bun): void
{
$this->bun = $bun;
}
public function setPatty(string $patty): void
{
$this->patty = $patty;
... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Builder/BurgerDirector.php | Creational/Builder/BurgerDirector.php | <?php
// Director
class BurgerDirector {
private BurgerBuilder $builder;
public function setBuilder(BurgerBuilder $builder): Burger {
$this->builder = $builder;
}
public function buildBurger(): Burger {
$this->builder->addBun();
$this->builder->addPatty();
$this->build... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Builder/Builders.php | Creational/Builder/Builders.php | <?php
// Concrete builder for basic burger
class BasicBurgerBuilder implements BurgerBuilder {
private Burger $burger;
public function __construct() {
$this->burger = new Burger();
}
public function addBun() {
$this->burger->setBun("Plain Bun");
}
public function addPatty() {... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/SimpleFactory/Product.php | Creational/SimpleFactory/Product.php | <?php
interface Product {
public function getName(): string;
public function getPrice(): int;
public function getDescription(): string;
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/SimpleFactory/ProductFactory.php | Creational/SimpleFactory/ProductFactory.php | <?php
class ProductFactory
{
/**
* @throws Exception
*/
public function createProduct(string $type, string $name, int $price, string $description): Product
{
if ($type == "book") {
return new Book($name, $price, $description);
} else if ($type == "clothing") {
... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/SimpleFactory/Products.php | Creational/SimpleFactory/Products.php | <?php
class Book implements Product {
public function __construct(
private readonly string $name,
private readonly int $price,
private readonly string $description
) {
}
public function getName(): string {
return $this->name;
}
public function getPrice(): in... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Singleton/Call.php | Creational/Singleton/Call.php | <?php
$singleton = Singleton::getInstance();
$singleton->doSomething(); // outputs "I am doing something!" | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Singleton/Singleton.php | Creational/Singleton/Singleton.php | <?php
class Singleton
{
private static ?Singleton $instance = null;
private function __construct()
{
// Private constructor to prevent creating new instances of the Singleton class
}
public static function getInstance(): Singleton
{
if (self::$instance === null) {
... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/StaticFactory/Readers.php | Creational/StaticFactory/Readers.php | <?php
class CsvReader implements DataReader
{
public function readData(string $filename): array
{
// Read and process data from CSV file
// Return data in a consistent format
}
}
class JsonReader implements DataReader
{
public function readData(string $filename): array
{
//... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/StaticFactory/DataProcessor.php | Creational/StaticFactory/DataProcessor.php | <?php
class DataProcessor
{
public static function createDataReader(string $type): DataReader
{
return match ($type) {
'csv' => new CsvReader(),
'json' => new JsonReader(),
'xml' => new XmlReader(),
default => throw new InvalidArgumentException('Invalid d... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/StaticFactory/DataReader.php | Creational/StaticFactory/DataReader.php | <?php
interface DataReader
{
public function readData(string $filename): array;
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/AbstractFactory/Client.php | Creational/AbstractFactory/Client.php | <?php
// Client code
function createUI(UIFactory $factory): string {
$button = $factory->createButton();
$checkbox = $factory->createCheckbox();
return $button->render() . $checkbox->render();
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/AbstractFactory/Factories.php | Creational/AbstractFactory/Factories.php | <?php
// Concrete Factory class
class WindowsUIFactory implements UIFactory {
public function createButton(): Button {
return new WindowsButton();
}
public function createCheckbox(): Checkbox {
return new WindowsCheckbox();
}
}
// Concrete Factory class
class MacOSUIFactory implements... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/AbstractFactory/Elements.php | Creational/AbstractFactory/Elements.php | <?php
// Concrete Product class
class WindowsButton implements Button {
public function render(): string {
return "Windows style button\n";
}
}
// Concrete Product class
class MacOSButton implements Button {
public function render(): string {
return "MacOS style button\n";
}
}
// Conc... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/AbstractFactory/UIFactory.php | Creational/AbstractFactory/UIFactory.php | <?php
// Abstract Factory interface
interface UIFactory {
public function createButton(): Button;
public function createCheckbox(): Checkbox;
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/AbstractFactory/ElementInterfaces.php | Creational/AbstractFactory/ElementInterfaces.php | <?php
// Abstract Product interface
interface Button {
public function render(): string;
}
// Abstract Product interface
interface Checkbox {
public function render(): string;
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Prototype/Prototypes.php | Creational/Prototype/Prototypes.php | <?php
class PHPBookPrototype extends BookPrototype {
function __construct() {
$this->topic = 'PHP';
}
function __clone() {
}
}
class SQLBookPrototype extends BookPrototype {
function __construct() {
$this->topic = 'SQL';
}
function __clone() {
}
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Prototype/Call.php | Creational/Prototype/Call.php | <?php
writeln('BEGIN TESTING PROTOTYPE PATTERN');
writeln('');
$phpProto = new PHPBookPrototype();
$sqlProto = new SQLBookPrototype();
$book1 = clone $sqlProto;
$book1->setTitle('SQL For Cats');
writeln('Book 1 topic: ' . $book1->getTopic());
writeln('Book 1 title: ' . $book1->getTitle());
writeln('');
$book2 = clo... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/Prototype/BookPrototype.php | Creational/Prototype/BookPrototype.php | <?php
abstract class BookPrototype
{
protected string $title;
protected string $topic;
abstract function __clone();
function getTitle(): string
{
return $this->title;
}
function setTitle($titleIn): void
{
$this->title = $titleIn;
}
function getTopic(): string... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/FactoryMethod/Factories.php | Creational/FactoryMethod/Factories.php | <?php
class CreditCardFactory implements PaymentMethodFactory {
private string $cardNumber;
private string $cvv;
private string $expiryDate;
public function __construct(string $cardNumber, string $cvv, string $expiryDate) {
$this->cardNumber = $cardNumber;
$this->cvv = $cvv;
$t... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/FactoryMethod/PaymentMethods.php | Creational/FactoryMethod/PaymentMethods.php | <?php
class CreditCard implements PaymentMethod {
private string $cardNumber;
private string $cvv;
private string $expiryDate;
public function __construct(string $cardNumber, string $cvv, string $expiryDate) {
$this->cardNumber = $cardNumber;
$this->cvv = $cvv;
$this->expiryDat... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Creational/FactoryMethod/Interfaces.php | Creational/FactoryMethod/Interfaces.php | <?php
interface PaymentMethod {
public function processPayment(int $amount);
}
interface PaymentMethodFactory {
public function create();
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/Iterator/User.php | Behavioral/Iterator/User.php | <?php
class User
{
public function __construct(
private readonly string $name,
private readonly int $age
) {
}
public function getName(): string
{
return $this->name;
}
public function getAge(): int
{
return $this->age;
}
public function get... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/Iterator/Call.php | Behavioral/Iterator/Call.php | <?php
// create some users
$user1 = new User('Saleh', 31);
$user2 = new User('Ahmad', 28);
$user3 = new User('Mina', 31);
// create a user list and add the users to it
$userList = new UserList();
$userList->addUser($user1);
$userList->addUser($user2);
$userList->addUser($user3);
// iterate over the user list and out... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/Iterator/UserList.php | Behavioral/Iterator/UserList.php | <?php
class UserList implements Countable, Iterator
{
/**
* @var User[]
*/
private array $users = [];
private int $currentIndex = 0;
public function addUser(User $user)
{
$this->users[] = $user;
}
public function removeUser(User $userToRemove)
{
foreach ($thi... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/Strategy/Strategies.php | Behavioral/Strategy/Strategies.php | <?php
class SilverDiscount implements DiscountStrategy
{
public function calculateDiscount($price): float
{
return $price * 0.1; // 10% discount for silver members
}
}
class GoldDiscount implements DiscountStrategy
{
public function calculateDiscount($price): float
{
return $price ... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/Strategy/Context.php | Behavioral/Strategy/Context.php | <?php
class ShoppingCart
{
private DiscountStrategy $discountStrategy;
private array $items = [];
public function addItem(Item $item): void
{
$this->items[] = $item;
}
public function setDiscountStrategy(DiscountStrategy $discountStrategy): void
{
$this->discountStrategy =... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/Strategy/DiscountStrategy.php | Behavioral/Strategy/DiscountStrategy.php | <?php
interface DiscountStrategy
{
public function calculateDiscount($price): float;
}
| php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/Strategy/Call.php | Behavioral/Strategy/Call.php | <?php
class Item
{
public string $name;
public float $price;
public function __construct($name, $price)
{
$this->name = $name;
$this->price = $price;
}
}
// Create a shopping cart
$cart = new ShoppingCart();
// Add items to the cart
$item1 = new Item('Widget', 10.00);
$item2 = ne... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/ChainOfResponsibility/Middleware.php | Behavioral/ChainOfResponsibility/Middleware.php | <?php
// Middleware interface
interface Middleware {
public function handle($request, Closure $next);
} | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/ChainOfResponsibility/Call.php | Behavioral/ChainOfResponsibility/Call.php | <?php
// Client code
$kernel = new Kernel();
$response = $kernel->handle(request());
$response->send(); | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/ChainOfResponsibility/Kernel.php | Behavioral/ChainOfResponsibility/Kernel.php | <?php
// Middleware kernel
class Kernel
{
protected array $middlewares = [
LoggingMiddleware::class,
AuthorizationMiddleware::class,
ThrottlingMiddleware::class,
];
public function handle($request)
{
$pipeline = array_reduce(array_reverse($this->middlewares), function (... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
salehhashemi1992/design-patterns-persian | https://github.com/salehhashemi1992/design-patterns-persian/blob/0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c/Behavioral/ChainOfResponsibility/Middlewares.php | Behavioral/ChainOfResponsibility/Middlewares.php | <?php
// Concrete middleware
class LoggingMiddleware implements Middleware
{
public function handle($request, Closure $next)
{
echo "Logging middleware handled the request.\n";
return $next($request);
}
}
class AuthorizationMiddleware implements Middleware
{
public function handle($req... | php | MIT | 0d0004cbaaf5fccb0ae55044f607f38ad7a48b4c | 2026-01-05T04:20:40.356616Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.