Skip to content

Instantly share code, notes, and snippets.

@bdelespierre
Last active October 17, 2017 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdelespierre/aef28377a54ee9336e26aac879054356 to your computer and use it in GitHub Desktop.
Save bdelespierre/aef28377a54ee9336e26aac879054356 to your computer and use it in GitHub Desktop.
<?php
namespace Addworking\JobOffers;
class LaravelDeveloper extends JobOffer
{
use Concerns\IsAwesome, Concerns\IsStartup, Concerns\IsDisruptive;
protected $fillable = [
'firstname', 'lastname', 'email',
];
public function validate(Request $request)
{
return $request->validate([
'experience' => 'nullable|numeric|between:0,4', // years
'skills' => 'required|array|in:php,git,bootstrap,heroku',
'start_date' => 'required|date|2017-11-01', // or sooner
'php_version' => 'numeric|min:7.1',
'laravel' => 'numeric|min:5.5',
]);
}
public function getLocationAttribute()
{
return "Paris 75019, Incubateur Le Cargo";
}
public function responsibilities()
{
// @todo change responsibilities as staff grows...
return new Collection([
'design', 'new_features', 'bug_fixes', 'peer_reviewing', 'deployment',
]);
}
public function apply()
{
return redirect('https://goo.gl/forms/ffN9V2JieLwOrDib2');
}
public function askQuestion(string $author, string $question): bool
{
return mail("benjamin@addworking.com", "Question", $question, "From: {$author}");
}
public function __debugInfo()
{
return [
'Your first duty will be to choose your Nerf gun.',
],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment