Is it better to store images as a string or a blob in the database?

|
natghi2010 2022-01-26 13:45:05
What I’m trying to say is you need ssh access
Acird Burn 2022-01-26 13:45:12
natghi2010 2022-01-26 13:44:15
Hosted on a server

How is a server and cpanel connected to my query that I asked?

natghi2010 2022-01-26 13:46:00
Acird Burn 2022-01-26 13:45:12
How is a server and cpanel connected to my query that I asked?

You can use socket io using their service

natghi2010 2022-01-26 13:46:24
But the alternatives may require you to self host
Acird Burn 2022-01-26 13:46:27
natghi2010 2022-01-26 13:46:00
You can use socket io using their service

I want an alternative

natghi2010 2022-01-26 13:46:39
Laravel echo and such
natghi2010 2022-01-26 13:47:05
No
natghi2010 2022-01-26 13:47:40
Websockets and web are two different services
Acird Burn 2022-01-26 13:47:40
natghi2010 2022-01-26 13:46:24
But the alternatives may require you to self host

All of them require to be hosted on a server

natghi2010 2022-01-26 13:48:01
Acird Burn 2022-01-26 13:47:40
All of them require to be hosted on a server

No you can use external service

Acird Burn 2022-01-26 13:48:12
natghi2010 2022-01-26 13:47:40
Websockets and web are two different services

What’s the difference between a web socket and socket IO?

Acird Burn 2022-01-26 13:48:38
natghi2010 2022-01-26 13:48:01
No you can use external service

Which kinds of external services

iyeoluwa 2022-01-26 13:50:05
Acird Burn 2022-01-26 13:48:12
What’s the difference between a web socket and socket IO?

SocketIo uses a web socket

Acird Burn 2022-01-26 13:51:00
iyeoluwa 2022-01-26 13:50:05
SocketIo uses a web socket

How different are the both of them u had said they are 2 different services

iyeoluwa 2022-01-26 13:52:16
Acird Burn 2022-01-26 13:51:00
How different are the both of them u had said they are 2 different services

I didn’t say that

Acird Burn 2022-01-26 13:53:42
natghi2010 2022-01-26 13:47:40
Websockets and web are two different services

…..

iyeoluwa 2022-01-26 13:58:51
Acird Burn 2022-01-26 13:53:42
…..

I’m not Natt

iyeoluwa 2022-01-26 14:00:14
SocketIo is an external service that helps you with websocket servers
iyeoluwa 2022-01-26 14:00:52
This does not mean that you cannot use web socket without SocketIo
iyeoluwa 2022-01-26 14:01:17
You can even set up your own web socket servers
hf_vrp 2022-01-26 14:12:35
I’ve a payment gateway, I want to access the product items after returning, so I created several tables Payments, Orders, OrderItems and configured the relationships between them. Each Payment is for one Order and each Order contains several OrderItem and each OrderItem contains one product. Now I want to access each Product through an object of the Payment Model, which returns the following error.

IlluminateDatabaseQueryException SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘orders.order_item_id’ in ‘field list’ (SQL: select products.*, orders.order_item_id as laravel_through_key from products inner join orders on orders.id = products.order_id where orders.order_item_id = 68 limit 1)

$product_order_item = $payment->order->order_items->map(function ($order_item) {
dd($order_item->product);
});

Payment Model:

protected $table = “payments”;
protected $guarded = [];

public function order() {
return $this->belongsTo(Order::class);
}

Order Model:

protected $table = “orders”;
protected $guarded = [];

public function payment() {
return $this->hasOne(Payment::class);
}

public function order_items() {
return $this->hasMany(OrderItem::class);
}

OrderItem Model:

protected $table = “order_items”;
protected $guarded = [];

public function order() {
return $this->belongsTo(Order::class);
}

public function product() {
return $this->hasOneThrough(Product::class, Order::class);
}

Product Model:

protected $table = “products”;
protected $guarded = [];

public function order_items() {
return $this->belongsToMany(OrderItem::class);
}

That is migrations:

Schema::create(‘orders’, function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger(‘user_id’);
$table->foreign(‘user_id’)->references(‘id’)->on(‘users’)->onDelete(‘CASCADE’);
$table->unsignedInteger(‘amount’);
$table->unsignedInteger(‘res_code’);
$table->enum(‘status’, [‘paid’, ‘unpaid’]);
$table->timestamps();
});

=====================================================

Schema::create(‘order_items’, function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger(‘order_id’);
$table->foreign(‘order_id’)->references(‘id’)->on(‘orders’)->onDelete(‘CASCADE’);

$table->unsignedBigInteger(‘product_id’);
$table->foreign(‘product_id’)->references(‘id’)->on(‘products’)->onDelete(‘CASCADE’);

$table->unsignedInteger(‘price’);
$table->timestamps();
});

===========================================================

Schema::create(‘payments’, function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger(‘order_id’);
$table->foreign(‘order_id’)->references(‘id’)->on(‘orders’)->onDelete(‘CASCADE’);
$table->enum(‘status’, [‘paid’, ‘unpaid’]);
$table->unsignedInteger(‘ref_id’);
$table->unsignedInteger(‘res_id’);
$table->enum(‘gateway’, [‘idpay’, ‘zarinpal’]);
$table->timestamps();
});

what is the problem? Thanks in advance…

natghi2010 2022-01-26 14:40:32
Acird Burn 2022-01-26 13:48:12
What’s the difference between a web socket and socket IO?

Think of it this way

natghi2010 2022-01-26 14:40:51
You know how you run php artisan serve
natghi2010 2022-01-26 14:41:17
And it loads a service using port 8080
Billygotclout 2022-01-26 15:35:12
Is it better to store images as a string or a blob in the database?
nikayana 2022-01-26 16:06:06
https://youtu.be/yWzLcpS0Hm0
itspirate 2022-01-26 17:05:43
Guys I have Installed Jetstream auth system then trying to install chatify package
all done without any problem but getting error in migrate file

plz help here is the migration error : https://pastebin.com/KqTf0e5T

Guudu 😊 2022-01-26 17:18:36
Looking for part time work
gausoft 2022-01-26 17:47:09
itspirate 2022-01-26 17:05:43
Guys I have Installed Jetstream auth system then trying to install chatify package
all done without any problem but getting error in migrate file

plz help here is the migration error : https://pastebin.com/KqTf0e5T

Can you comment lines in 2022_01_26_999999_add_active_status_to_users.php and retry again?

PALIWAL ENTERPRISE 2022-01-26 17:51:09
Guudu 😊 2022-01-26 17:18:36
Looking for part time work

Contact me i have a work

Bright 2022-01-26 18:03:03
Guudu 😊 2022-01-26 17:18:36
Looking for part time work

I’m seriously in need of work

N4YE3M 2022-01-26 18:03:52
i need a package that will enable me to ping ip address domain from my laravel application!!!

should work with laravel 8 and also in shared hosting.

Bright 2022-01-26 18:05:01
Please if you have one notify me please
Samvel Shamamyan 2022-01-26 18:31:05
laravel_discuss-106077.jpg
Hello)
I get this problem.
What is this?
Sahoodsd 2022-01-26 20:13:48
Hey guys i need to join a table by only two row like limit of the which table joined to be should be two
|