π« You can reach me on [email protected] or on twitter
victor-falcon / laravel-task Goto Github PK
View Code? Open in Web Editor NEWA simple way to trigger tasks in a clean and simple way
License: MIT License
A simple way to trigger tasks in a clean and simple way
License: MIT License
π« You can reach me on [email protected] or on twitter
hi,
can you please explain whats the benefit of this package is beside the build-in tools laravel already offers?
I donΒ΄t really understand this.
thanks a lot,
micha
To replicate just create a task with a primitive in the constructor:
final class GetUser extends Task
{
use Taskable;
private string $email;
public function __construct(string $email)
{
$this->email = $email;
}
public function handle(): User
{
return User::whereEmail($this->email)->firstOrFail();
}
}
And run artisan task:ide-help
.
β― ./vessel artisan task:ide-help
Illuminate\Contracts\Container\BindingResolutionException
Unresolvable dependency resolving [Parameter #0 [ <required> string $email ]] in class App\Tasks\User\GetUser
at vendor/laravel/framework/src/Illuminate/Container/Container.php:1053
1049β protected function unresolvablePrimitive(ReflectionParameter $parameter)
1050β {
1051β $message = "Unresolvable dependency resolving [$parameter] in class {$parameter->getDeclaringClass()->getName()}";
1052β
β 1053β throw new BindingResolutionException($message);
1054β }
1055β
1056β /**
1057β * Register a new before resolving callback for all types.
+22 vendor frames
23 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.