Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cawa87/laravel-doctrine-app
Laravel doctrine example
https://github.com/cawa87/laravel-doctrine-app
doctrine laravel laravel-doctrine
Last synced: about 1 month ago
JSON representation
Laravel doctrine example
- Host: GitHub
- URL: https://github.com/cawa87/laravel-doctrine-app
- Owner: cawa87
- License: mit
- Created: 2016-03-05T20:19:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-07T10:53:13.000Z (almost 9 years ago)
- Last Synced: 2023-09-18T23:15:21.440Z (over 1 year ago)
- Topics: doctrine, laravel, laravel-doctrine
- Language: JavaScript
- Size: 688 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-doctrine-app
## Laravel doctrine example
## Whats inside
- Laravel 5.2.*
- Laravel doctrine ORM, [docs](http://www.laraveldoctrine.org/docs/1.1/orm)
- Laravel doctrine ACL, [docs](http://www.laraveldoctrine.org/docs/1.1/acl)
- Annotations, [docs](https://laravelcollective.com/docs/5.2/annotations)
- Forms & HTML, [docs](https://laravelcollective.com/docs/5.2/html)
- Socilate, [docs](https://github.com/laravel/socialite)
- Socilate provider vkontakte, [docs](http://socialiteproviders.github.io/providers/vkontakte/)
- 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', ```