@cbernard
- Member Since
- Mar 11, 2024
- Lessons Completed
- 42
- Comments Contributed
- 6
- Hours Watched
- 5.12
Recent Activity
Here's what @cbernard has been up to this past year
-
Completed lesson Component Props and Default State
-
-
Commented on post Defining One to Many Relationships with Lucid Models
Hi Tom, is there any way to do a polymorphic relationship? Or how would you accomplish having a model (e.g. Comments) that could belong to more than one model type (e.g. Movies and Cinests)?
-
Completed lesson Checking For and Populating an Authenticated User
-
Completed lesson Protecting Routes with Auth, Guest, and Admin Middleware
-
Completed lesson Reading and Supporting Markdown Content
-
Completed lesson Saving All Or Nothing with Database Transactions
-
Completed lesson Using Dependency Injection to Update A User's Profile
-
Completed lesson How to Create and Fix Missing User Profiles in Your Application
-
Completed lesson Extracting Reusable Code with Services
-
Completed lesson Displaying Validation Errors and Validating from our Request
-
Completed lesson Validating Form Data with VineJS
-
Completed lesson Accepting Form Data
-
Completed lesson The Flow of Middleware
-
Completed lesson Cleaning Up Routes with Controllers
-
Completed lesson AdonisJS User Role Authentication in 15 Minutes
-
-
Upvoted comment Hi cbernard!!Yeah, assuming you're using MySQL, it appears it...
-
Completed lesson Environment Variables and their Validation
-
Completed lesson Validating Route Parameters
-
Commented on post How To Create A Password Reset Flow in NodeJS with AdonisJS
Hi Tom,
I've been porting what you did here to Adonis 6, but I'm seeing some behaviour that is consistent with what Kreek said a year ago. Update seems to behave differently to create. Any ideas what I'm doing wrong?
//This works await Token.create({ userId: user.id, type: 'PASSWORD_RESET', token: 'random-token-value', expiresAt: DateTime.now(), }) //This works const token = await Token.findOrFail(1) token.expiresAt = DateTime.now().plus({ month: 1 }) await token.save() //But this fails with update `tokens` set `expires_at` = 2024-04-06 08:48:15.182 +00:00 where `user_id` = 1 - Unknown column '_zone' in 'field list' await user.related('tokens').query().update({ expiresAt: DateTime.now(), }) //But this works await user.related('tokens').query().update({ expiresAt: new Date(), }) ``
Copied!````````````
Copied! -
Completed lesson Defining Many-To-Many Relationships and Pivot Columns
-
Completed lesson Introducing Lucid Models
-
Completed lesson Unmapped and Computed Model Properties
-
Completed lesson Introducing and Defining Database Migrations
-
Completed lesson Understanding our Database Schema
-
Replied to Hey cbernard! Thank you, I'm happy to hear that! Yeah, so the...
Thanks Tom for the speedy reply. I had originally tried that but to no avail. However, I found my issue. It was because the
globals.ts
was not registered with thepreloads
inadonisrc.ts
. I think that is explained in lesson 3.8, but I must have missed it. -
Completed lesson VS Code Extensions and Configuration
-
Completed lesson Project Structure
-
Completed lesson Creating A New AdonisJS 6 Project
-
Completed lesson What We'll Need Before We Begin
-
Commented on post Easy SVG Icons with Edge Iconify
Hi Tom, really enjoying the videos. I have a question on this one. As per the documentation I'm using in globals.ts
import { Edge } from 'edge.js' import { edgeIconify, addCollection } from 'edge-iconify' import { icons as heroIcons } from '@iconify-json/heroicons' addCollection(heroIcons) const edge = Edge.create() edge.use(edgeIconify)
Copied!And then in my
home.edge
I'm using@svg('heroicons:arrow-left-solid')
but I just get raw tag rendered rather than the svg icon. Any ideas?Copied! -
Completed lesson Configuring Lucid and our Database Connection
-
Completed lesson Easy SVG Icons with Edge Iconify
-
Completed lesson HTTP Method Spoofing HTML Forms
-
Completed lesson Form Basics and CSRF Protection
-
Completed lesson State vs Share Data Flow
-
Completed lesson Use Slots To Make A Button Component
-
Completed lesson Extracting A Layout Component
-
Completed lesson Making A Reusable Movie Card Component
-
Completed lesson HTML Attribute and Class Utilities
-
Completed lesson EdgeJS Templating Basics
-
Completed lesson Introducing AdonisJS
-
Completed lesson Linking Between Routes
-
Completed lesson Rendering a View for a Route
-
Completed lesson Routes and How To Create Them
-
Completed lesson Setting Up Tailwind CSS
-
Completed lesson Defining A Structure for our Movie using Models
-
Completed lesson Vite and Our Assets
-
Account created Welcome to Adocasts, @cbernard!