1. Go to this page and download the library: Download digbang/laravel-project 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/ */
digbang / laravel-project example snippets
public function users(): ?array
{
if ($this->input(self::USER_IDS)) {
return $this->repository(UserRepository::class)->find($this->input(self::USER_IDS));
}
return null;
}
private function roleRepository(): RoleRepository
{
/** @var RoleRepository $repository */
$repository = $this->repository(RoleRepository::class);
return $repository;
}
public function roles(): ?array
{
if ($this->input(self::ROLE_NAME)) {
return $this->roleRepository()->findByName($this->input(self::ROLE_NAME));
}
return null;
}