Install the Clockwork library via Composer.
$ composer require itsgoingd/clockwork
Initialize Clockwork early in your application.
<?php namespace Clockwork\Support\Symfony; | |
use Clockwork\Clockwork; | |
use Clockwork\Support\Laravel\Console\CapturingFormatter; | |
use Symfony\Component\Console\Application; | |
use Symfony\Component\Console\ConsoleEvents; | |
use Symfony\Component\Console\Event\ConsoleCommandEvent; | |
use Symfony\Component\Console\Event\ConsoleTerminateEvent; | |
use Symfony\Component\EventDispatcher\EventDispatcher; |
Install the Clockwork library via Composer.
$ composer require itsgoingd/clockwork
Initialize Clockwork early in your application.
<?php namespace Deployer; | |
require 'recipe/composer.php'; | |
require 'recipe/npm.php'; | |
require 'recipe/slack.php'; | |
// Project name | |
set('application', 'Project Name'); | |
// Project repository |
deploy to staging: | |
image: bobey/docker-gitlab-ci-runner-php7 | |
environment: | |
name: staging | |
url: https://test.example.com | |
only: | |
- master | |
script: | |
- wget -q https://getcomposer.org/composer.phar | |
- mkdir -p ~/.ssh |
#! /usr/bin/env ruby | |
# usage: | |
# $ das_download.rb email password | |
# based on various gists from this thread https://gist.github.com/maca/1798070 | |
require "mechanize" | |
require "fileutils" | |
class DasDownloader | |
attr_reader :agent, :email, :password |
<?php | |
namespace App\Console; | |
use Illuminate\Console\Scheduling\Schedule; | |
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | |
class Kernel extends ConsoleKernel | |
{ | |
/** |
<?php | |
namespace Dingo\Api\Routing\Adapter; | |
use ArrayIterator; | |
use ReflectionClass; | |
use FastRoute\Dispatcher; | |
use FastRoute\RouteParser; | |
use Illuminate\Support\Str; | |
use Illuminate\Http\Request; |
<?php | |
use SlimFacades\App as BaseAppFacade; | |
class App extends BaseAppFacade | |
{ | |
// Bind a value into the Slim container | |
public static function bind($key, $value) | |
{ | |
self::$app[$key] = $value; |
<?php | |
use Illuminate\Http\Response; | |
use Clockwork\Clockwork; | |
use Clockwork\Support\Laravel\ClockworkServiceProvider; | |
App::error(function(Exception $exception) | |
{ | |
$app = app(); |
<?php | |
/* Example of a base model, which uses 0 instead of null value of the deleted_at as the deleted state when using soft-delete */ | |
class BaseModel extends \Illuminate\Database\Eloquent\Model | |
{ | |
/** | |
* Get a new query builder for the model's table. | |
* | |
* @param bool $excludeDeleted |