2708 search results for Doctrine

Filtering Searching

... use setParameter('filter' , '%'.$filter.'%'). Finish things by returning $qb at the bottom: If you were using something like Elastic Search, then you wouldn't be making this query through Doctrine: you'd be doing it ...

4:14
DoctrineExtensions Sluggable

... the only thing we need is under the orm.default key: add sluggable: true: This library adds several different magic behaviors to Doctrine, and sluggable - the automatic generation of a slug - is just one of them. And ...

4:59
Create Genus Note

... It's you again! Welcome back friend! In this tutorial, we're diving back into Doctrine: this time to master database relations. And to have fun of course - databases are super fun. Like usual, you should code along with ...

5:16
Adding a Cache Service

... Prototype comment above that is a confusing term that means that we can call this name anything we want. Let's make it my_markdown_cache: You'll see how that's important in a second. Finally, tell Doctrine what type of ...

3:27
Config.yml Control Center for Services

... parameters - which we'll talk about soon - every root key in this file - like framework, twig and doctrine - corresponds to a bundle that is being configured: All of this stuff under framework is configuration for the ...

4:24
Dynamic Roles

... Give it the @ORM\Column annotation and set its type to json_array: This is really cool because the $roles property will hold an array of roles, but when we save, Doctrine will automatically json_encode that array and ...

4:10
The UserInterface Methods Keep some Blank

... leaving these blank. So in our application, we want to store users in the database. So let's set this class up with Doctrine. Copy the use statement from SubFamily and paste it here: Next, I'll put my cursor inside the ...

4:19
The All-Important User Class

... - like a central authentication server. In those cases, you will still have a User class, you just won't store it with Doctrine. More on that as we go along. Ok, we've got the empty user class: let's fill it in! ...

4:22
Binding Forms to Objects data_class

... that isPublished should be a checkbox because that's a boolean field in Doctrine: And since firstDiscoveredAt is a date, it rendered it with year-month-day drop-down boxes. Now, those three boxes are totally ugly and we'll ...

4:44
Webhooks Preventing Replay Attacks

... StripeEventLog: Give it a few properties: $id, $stripeEventId and a $handledAt date field: Since this project uses Doctrine, I'll add a special use statement on top and then add some annotations, so that this new class will become ...

5:41
Testing Part 2 Faking the Event Lookup

... Doctrine is tricking us! In reality, the database has been updated to show that the Subscription is canceled, but this Subscription object is out-of-date. Query for a fresh one with $subscription = $this->em - I set the ...

5:06
Webhook Subscription Canceled

... canceled. Below, really simple, say $subscription->cancel(). Then, use the Doctrine entity manager to save this to the database: Mind blown! Back in the controller, call this! Above the switch statement, add a ...

5:08
Adding Dynamic Roles to each User

... a JSON string. Doctrine takes care of converting back and forth between the array and JSON. Now, just update the getRoles() method to use this property and add a setRoles method: public function getRoles() { } public ...

4:56
... data, the backend admin can verify, update and enrich this lead. Finally the CLI can also act on the leads somehow in the workflow. In Doctrine this would be represented by a "Lead" entity and it should be shared between ...
Philipp Rieber
Philipp Rieber
Read Full Comment
Hey Dmirtiy, As I see you use migrations which is super cool! And despite the fact that Doctrine generate a migration for you to sync your DB schemas, you are totally able to write/add custom queries inside that ...
... to use with Doctrine ORM and Symfony form component? So do you guys at KNPU personally use DTO (which would solve the type hinting issue)? Using DTO seems impossible to update entities with OneToMany relationship for example, or am I missing something.. Thank you!
Anthony R.
Anthony R.
Read Full Comment
... reason is that we need to release "Database & Doctrine" and "Symfony Forms" courses before we start working on "Security, Registration and Authentication with Guard" one. Well, if you need this course now - we have a similar ...
... allow the user to install what they need. BUT, use Symfony Flex to make installation much easier :). So, there still *are* many packages that we recommend: like Twig *if* you need a templating engine or Doctrine *if* you ...
weaverryan
weaverryan
Read Full Comment
... Doctrine (a dependency of your project) simultaneously uses version 1.3. That's not possible in PHP, but (for better or worse, it has pros and cons) that *is* possible in Node land :). But you *are* safe with that fix - it's no magic. Hopefully now it makes a bit more sense at least! Cheers!
weaverryan
weaverryan
Read Full Comment
Had trouble loading doctrine-fixtures-bundle and nelmio/alice... when trying to do the require --dev for them I got all kinds of errors about symfony/symfony 3.1.4 satisfiable by v3.1.4 and so forth....on a bunch of ...