This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Api; | |
use App\Http\Controllers\Controller as BaseController; | |
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
abstract class Controller extends BaseController | |
{ | |
protected $realClass; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Repositories\Contracts; | |
interface Repository | |
{ | |
public function all($columns = array('*')); | |
public function paginate($perPage = 15, $columns = array('*')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Doggo\Http\Controllers; | |
use Doggo\Models\Customer; | |
use Doggo\Helpers\ModelHelper; | |
use Illuminate\Http\Request; | |
class CustomerController extends Controller | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SomeController extends Controller | |
{ | |
public function someMethod(Request $request) | |
{ | |
$data = $request->intersect(array_keys(SomeModel::$rules)); | |
$validator = validator($data, SomeModel::$rules; |