https://github.com/labodidavid/labodidavid
https://github.com/labodidavid/labodidavid
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/labodidavid/labodidavid
- Owner: LabodiDavid
- Created: 2023-05-09T12:42:45.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-10T19:57:57.000Z (almost 3 years ago)
- Last Synced: 2025-02-23T22:34:41.975Z (12 months ago)
- Size: 15.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README




## π οΈ I'm familiar with..





































β Click here to see an introduce of myself in PHP laravel β
```php
namespace World\Earth\Europe\Hungary;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use App\Models\Question;
use App\Models\Solution;
use App\Models\Knowledge;
use Udemy;
use Google;
use StackOverFlow;
use GPT;
class Labodi_David extends People
{
use HasMotivation, HasGoals;
protected $fillable = ['coffee', 'knowledge'];
public function __construct()
{
$this->middleware(['PreventRequestsWithoutCoffee', 'IT_Administrator', 'Programmer']);
}
/**
* Find the solution to a question.
*
* @param Question $question
* @return Solution
*/
public function findSolution(Question $question): Solution
{
if ($this->knowledge->contains($question)) {
return $this->knowledge()->getSolution($question);
}
return $this->learn($question)->getSolution();
}
/**
* Learn about a question and gather knowledge.
*
* @param Question $question
* @return Knowledge
* @throws CoffeeNotFoundException
*/
private function learn(Question $question): Knowledge
{
$knowledge = new Knowledge();
if ($this->hasDrankCoffee()) {
while (!$knowledge->hasInformation()){
$knowledge->collectInformation([
Google::search($question),
StackOverFlow::search($question),
GPT::ask($question)
]);
}
return $this->knowledge()->save($knowledge);
} else {
throw new CoffeeNotFoundException();
}
}
/**
* Get the knowledge relation.
*
* @return BelongsToMany
*/
public function knowledge(): BelongsToMany
{
return $this->belongsToMany(Knowledge::class);
}
/**
* Check if David has drank coffee.
*
* @return bool
*/
private function hasDrankCoffee(): bool
{
return !empty($this->coffee);
}
}
```
#### π₯ Fancy stuffs I used in this profile README:
- [Typing intro](https://codesandbox.io/s/readme-introgif-9fjo5) (π
ππ πΏππππππππΉπ πππ π
ππ.ππ) by [Raymo111](https://github.com/Raymo111)
- [shields.io](https://shields.io/) badges
- [visitor-badge](https://github.com/hehuapei/visitor-badge) by [hehuapei](https://github.com/hehuapei)
- [Summary Widget](https://docs.codersrank.io/widgets/summary-widget) by [CodersRank.io](https://codersrank.io)