Skip to content

Instantly share code, notes, and snippets.

View Mulkave's full-sized avatar
🍅
binge coding

Abed Halawi Mulkave

🍅
binge coding
View GitHub Profile
<?php
class UpdateArticleFeature extends Feature
{
public function handle(Request $request)
{
$this->run(new ValidateArticleInputForUpdateJob($request->input()));
// process cover photo
$photo = $this->run(MakePhotoFromDataJob::class, ['data' => $request->input('photo')]);
<?php
class CreateArticleFeature extends Feature
{
public function handle(Request $request)
{
$this->run(new ValidateArticleInputForCreationJob($request->input()));
// process cover photo
$photo = $this->run(MakePhotoFromDataJob::class, ['data' => $request->input('photo')]);

Trellis • My Service

This service fetches ghosts and throws them at every client requesting it, in the hope of being haunted.

Namespace: Trellis\MyService

Requirements

  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
<?php
namespace Directory\Foundation\Providers;
use Illuminate\Routing\Router;
use Caffeinated\Modules\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
protected $serviceName = '';
<?php
namespace Directory\Domains\Http\Jobs;
use Directory\Foundation\AbstractJob;
use Illuminate\Routing\ResponseFactory;
class RespondWithJsonJob extends AbstractJob
{
private $content;
<?php
namespace Directory\Services\Site\Tests\Features;
use Faker\Factory as Faker;
use Directory\Foundation\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
class RegisterCitizenFeatureTest extends TestCase
{
<?php
namespace Directory\Foundation;
use TestCase as BaseTestCase;
class TestCase extends BaseTestCase
{
}
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
<?php
namespace Directory\Domains\Notification\Notifications;
use Directory\Foundation\Notification;
use Directory\Data\Entities\Citizen\Citizen;
class CitizenCreatedNotification extends Notification
{
private $citizen;
<?php
namespace Directory\Domains\Notification\Jobs;
use Event;
use Directory\Foundation\AbstractQueueableJob;
class NotifyOfficersJob extends AbstractQueueableJob
{
private $notification;