Skip to content

Instantly share code, notes, and snippets.

View mehdi-fathi's full-sized avatar
🎯
Focusing

Mehdi Fathi mehdi-fathi

🎯
Focusing
View GitHub Profile
{
"openapi": "3.0.3",
"info": {
"title": "App - OpenAPI 3.0",
"description": "This is a sample end-point on the OpenAPI 3.0 specification. You can find out more about",
"termsOfService": "http://swagger.io/terms/",
"version": "1.0.11"
},
"servers": [
{
<?php
use eloquentFilter\QueryFilter\ModelFilters\Filterable;
class User extends Model
{
use Filterable;
private static $whiteListFilter =[
'username',
<?php
namespace App\Http\Controllers;
/**
* Class UsersController.
*/
class UsersController
{
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
class UserController extends Controller
{
public function index(Request $request)
use Illuminate\Database\Eloquent\Builder;
/**
* Trait usersFilter.
*/
trait usersFilter
{
/**
* @param \Illuminate\Database\Eloquent\Builder $builder
* @param $value
@mehdi-fathi
mehdi-fathi / UsersController.php
Last active February 13, 2020 07:57
UsersController
<?php
namespace App\Http\Controllers;
use eloquentFilter\QueryFilter\ModelFilters\ModelFilters;
/**
* Class UsersController.
*/
class UsersController
{
<?php
namespace Tests\Models;
use eloquentFilter\QueryFilter\ModelFilters\Filterable;
use Illuminate\Database\Eloquent\Model;
/**
* Class User.
*/
@mehdi-fathi
mehdi-fathi / UserController.php
Last active December 13, 2019 16:06
usersController
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
class UserController extends Controller
{
public function index(Request $request)