cawa87 / laravel-doctrine-app

Laravel doctrine example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

laravel-doctrine-app

Laravel doctrine example

Whats inside

  • Laravel 5.2.*
  • Laravel doctrine ORM, docs
  • Laravel doctrine ACL, docs
  • Annotations, docs
  • Forms & HTML, docs
  • Socilate, docs
  • Socilate provider vkontakte, docs
  • Debug-bar
  • Twitter bootstrap 4, via bower

Settings

.env

DOCTRINE_LOGGER=LaravelDoctrine\ORM\Loggers\LaravelDebugbarLogger logger for doctrine queries, to see it in debug bar.


VKONTAKTE_KEY=xxx
VKONTAKTE_SECRET=xxxx
VKONTAKTE_REDIRECT_URI=http://xxxx

VK social provider settings.

About

Base controller implements EntityManager injection, so if you extend it you can use in your controller something like:

$this->em->getRepository(\App\Entities\User::class)->findAll();

Creating new user

 /**
     * Create a new user instance after a valid registration.
     *
     * @param  array  $data
     * @return User
     */
    protected function create(array $data)
    {
        $user = new \App\Entities\User();

        $user->setName($data['name']);
        $user->setEmail($data['email']);
        $user->setPassword(bcrypt($data['password']));

        $this->em->persist($user);
        $this->em->flush();

        return $user;
    }

Validator, uniq email 'email' => 'required|email|max:255|unique:App\Entities\User,email',

About

Laravel doctrine example

License:MIT License


Languages

Language:JavaScript 64.5%Language:PHP 34.7%Language:Ruby 0.4%Language:ApacheConf 0.2%Language:PowerShell 0.1%Language:CSS 0.0%