Skip to content

repat/laravel-job-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-job-models

Latest Version on Packagist Total Downloads

laravel-job-models contains 2 Eloquent models for the tables jobs and job_fails (or however they're defined in the queue.php config file) as created by the 2 artisan commands queue:table and queue:failed-table.

Installation

$ composer require repat/laravel-job-models

Documentation

Casting

There is a casting to \Carbon\Carbon objects for: reserved_at, available_at, created_at and failed_at and a casting to array for payload.

Attributes/ Mutators

There are getters for all the keys of the payload, including the data array. For more information, see the Laravel Documentation on Eloquent Mutators.

$job = \Repat\LaravelJobs\Job::first();

$job->display_name;
$job->max_tries;
$job->delay;
$job->timeout;
$job->timeout_at; // cast to Carbon if not null
$job->command_name; // ->payload['data']['commandName']
$job->command; // unserialized

License

Version

  • Version 0.9

Contact

repat

Flattr this git repo

About

Laravel Eloquent Models for jobs and job_fails

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages