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\Requests; | |
| use App\Http\Requests\Request; | |
| class CreateUserRequest extends Request { | |
| /** | |
| * The URI to redirect to if validation fails | |
| * | |
| * @var string |
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; | |
| use App\Http\Controllers\Controller; | |
| use App\Http\Requests\CreateUserRequest; | |
| class UsersController extends Controller { | |
| /** | |
| * Store a newly created resource in storage. | |
| * |
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; | |
| use App\Http\Controllers\Controller; | |
| class UsersController extends Controller { | |
| /** | |
| * Store a newly created resource in storage. | |
| * | |
| * @return Response |
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\Requests; | |
| use App\Http\Requests\Request; | |
| class CreateUserRequest extends Request { | |
| /** | |
| * Get the validation rules that apply to the request. | |
| * | |
| * @return 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 App\Http\Requests; | |
| use App\Http\Requests\Request; | |
| class CreateUserRequest extends Request { | |
| /** | |
| * Get the validation rules that apply to the request. | |
| * | |
| * @return 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 App\Http\Controllers; | |
| use App\Contracts\Repositories\ClientRepositoryInterface; | |
| class ClientsController extends BaseController | |
| { | |
| /** | |
| * Valid | |
| */ | |
| public function show(ClientRepositoryInterface $repository, $id) { |
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; | |
| use App\Contracts\Repositories\ClientRepositoryInterface; | |
| class ClientsController extends BaseController | |
| { | |
| public function index(ClientRepositoryInterface $repository) { | |
| return $repository->getCollection(); | |
| } | |
| } |
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; | |
| use App\Repositories\ClientRepository; | |
| class ClientsController extends BaseController | |
| { | |
| public function index(ClientRepository $repository) { | |
| return $repository->getCollection(); | |
| } | |
| } |
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\ServiceProviders\Resources; | |
| use Illuminate\Support\ServiceProvider as LaravelServiceProvider; | |
| class ClientServiceProvider extends LaravelServiceProvider | |
| { | |
| public function register() | |
| { | |
| $this->app->bind( | |
| 'App\Contracts\Repositories\ClientRepositoryInterface', |
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; | |
| use App\Contracts\Repositories\ClientRepositoryInterface; | |
| class ClientsController extends BaseController | |
| { | |
| protected $repository; | |
| public function __construct(ClientRepositoryInterface $repository) { | |
| $this->repository = $repository; |
NewerOlder