Lyanor
TTCTheo's Typesafe Cult
•Created by ChrisEvans on 1/30/2025 in #questions
Do you really need an ORM?
@ChrisEvans
Yes, ORMs are widely used in organizations, especially in large-scale applications where maintaining raw SQL queries can become cumbersome. They are common in backend development for handling database interactions in a structured, maintainable way.
12 replies
TTCTheo's Typesafe Cult
•Created by dominicdigi on 1/22/2025 in #questions
Does Upload thing allow for a folder structure?
If you're using expo, you can simply use
expo-document-picker
It will showed up all data folder on your phone.4 replies
TTCTheo's Typesafe Cult
•Created by dominicdigi on 1/22/2025 in #questions
Does Upload thing allow for a folder structure?
@dominicdigi
what're you using to build app? Expo?
4 replies
TTCTheo's Typesafe Cult
•Created by Amro_97 on 1/27/2025 in #questions
upload video to firebase and show it in next js
@Amro_97
By default, Firebase Storage restricts access. To allow public access (not recommended for production), update your Firebase Storage rules.
Go to
Firebase Console -> Storage -> Rules
, and modify them to:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read;
allow write: if request.auth != null;
}
}
}
4 replies
TTCTheo's Typesafe Cult
•Created by 👾Rnbsov on 1/24/2025 in #questions
NestJS and DrizzleOrm question
@👾Rnbsov awesome, sql query is more scalable and fast method than using pre-built in mvc
13 replies
TTCTheo's Typesafe Cult
•Created by 👾Rnbsov on 1/24/2025 in #questions
NestJS and DrizzleOrm question
First define
- User.php
class User extends Authenticatable
{
public function roles()
{
return $this->hasMany(UserRole::class);
}
public function authorizedClubs()
{
return $this->belongsToMany(Club::class, 'user_roles')
->whereIn('user_roles.role_id', function ($query) {
$query->select('id')
->from('roles')
->whereIn('name', ['President', 'Staff']);
});
}
}
- Club.php
class Club extends Model
{
public function users()
{
return $this->belongsToMany(User::class, 'user_roles');
}
}
On your controller, you can get clubs like this easliy:
$user = Auth::user();
$clubs = $user->authorizedClubs()->get();
13 replies
TTCTheo's Typesafe Cult
•Created by 👾Rnbsov on 1/24/2025 in #questions
NestJS and DrizzleOrm question
you can do like this
13 replies
TTCTheo's Typesafe Cult
•Created by 👾Rnbsov on 1/24/2025 in #questions
NestJS and DrizzleOrm question
If you're using laravel, mysql
13 replies
TTCTheo's Typesafe Cult
•Created by 👾Rnbsov on 1/24/2025 in #questions
NestJS and DrizzleOrm question
@👾Rnbsov are you using laravel?
13 replies