1. Go to this page and download the library: Download telkins/laravel-inquiry library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
php
use Telkins\LaravelInquiry\Inquiry;
use Telkins\LaravelInquiry\Contracts\Details;
class CanChildPlayPS4 extends Inquiry
{
public function provideAnswer(Details $details)
{
if (! $details->child->areChoresDone()) {
return false;
}
if ($details->child->isGrounded()) {
return false;
}
if (! $details->child->isDoneWithHomework()) {
return false;
}
return $this->isItAGoodTimeToPlay($details->dateTime);
}
// supporting methods, if needed...
}
php
use App\Child;
use Carbon\CarbonImmutable;
use Telkins\LaravelInquiry\Details;
class CanChildPlayPS4Details extends Details
{
public $child;
public $dateTime;
public function child(Child $child): self
{
$this->child = $child;
return $this;
}
public function onDateTime(CarbonImmutable $dateTime): self
{
$this->dateTime = $dateTime;
return $this;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.