first init
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace $CLASS_NAMESPACE$;
|
||||
|
||||
use Modules\$MODULE$\Entities\$MODULE$;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
interface $CLASS$
|
||||
{
|
||||
/**
|
||||
* Get all $LOWER_NAME$s with pagination and search
|
||||
*/
|
||||
public function getAllPaginated(int $perPage = 10, string $search = '');
|
||||
|
||||
/**
|
||||
* Get all $LOWER_NAME$s with their relationships and pagination with search
|
||||
*/
|
||||
public function getAllWithRelationsPaginated(int $perPage = 10, string $search = '');
|
||||
|
||||
/**
|
||||
* Get all $LOWER_NAME$s with their relationships and search
|
||||
*/
|
||||
public function getAllWithRelations(string $search = ''): Collection;
|
||||
|
||||
/**
|
||||
* Create a new $LOWER_NAME$
|
||||
*/
|
||||
public function create(array $data): $MODULE$;
|
||||
|
||||
/**
|
||||
* Find $LOWER_NAME$ by ID
|
||||
*/
|
||||
public function findById(int $id): ?$MODULE$;
|
||||
|
||||
/**
|
||||
* Delete $LOWER_NAME$ (soft delete)
|
||||
*/
|
||||
public function delete(int $id): bool;
|
||||
|
||||
/**
|
||||
* Get all $LOWER_NAME$s
|
||||
*/
|
||||
public function all(string $search = ''): Collection;
|
||||
}
|
||||
Reference in New Issue
Block a user