PHP code example of sim-vzla / laracruds
1. Go to this page and download the library: Download sim-vzla/laracruds 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/ */
sim-vzla / laracruds example snippets
namespace App\Repositories;
use Laracruds\EloquentRepository as BaseRepository;
use App\User;
class UserRepository extends BaseRepository
{
public function __construct()
{
parent::__construct(new User);
}
}
namespace App\Helpers\Validators;
use Laracruds\BaseValidator;
class UserValidator extends BaseValidator
{
public function rules($id)
{
return [
'email' => '