PHP code example of um-flint / laravel-repository
1. Go to this page and download the library: Download um-flint/laravel-repository 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/ */
um-flint / laravel-repository example snippets
namespace App\Rules;
use App\Models\Announcement;
use Illuminate\Validation\Rule;
use UMFlint\Repository\Rules\BaseRules;
class AnnouncementRules extends BaseRules
{
protected function rules(): array
{
return [
'type' => ['
namespace App\Repositories;
use App\Models\Announcement;
use App\Rules\AnnouncementRules;
use UMFlint\Repository\BaseRepository;
class AnnouncementRepository extends BaseRepository
{
public function model(): string
{
return Announcement::class;
}
public function rules(): array
{
return AnnouncementRules::getRules();
}
}