Is there any example of broadcasting with laravel, pusher, ajax, events with crud functionality?

|
shinejemi 2021-05-23 21:57:41
Any clone for Amazon with multi vendor , admin and user?
programmer1453 2021-05-23 21:57:50
DesolatorMagno 2021-05-23 21:57:33
👍.

thank you 😊

DesolatorMagno 2021-05-23 21:58:32
SureshLaraDev 2021-05-23 21:57:07
what’s the diff btw public_path(‘/images/’) and public_path(‘images’)

depend in what you are doing.

shinejemi 2021-05-23 21:58:57
What kind of data structures I should use in a laravel website and where?
SureshLaraDev 2021-05-23 21:59:08
public_path(‘images’) worked when I try to upload a message. inside store function
DesolatorMagno 2021-05-23 21:59:27
i use more something like Disk::(‘avatar’)->get($user->avatar)
SureshLaraDev 2021-05-23 21:59:43
the same didn’t work on update..I had to replace it with public_path(‘/images/’)
SureshLaraDev 2021-05-23 21:59:55
and it worked
SureshLaraDev 2021-05-23 22:00:33
DesolatorMagno 2021-05-23 21:59:27
i use more something like Disk::(‘avatar’)->get($user->avatar)

lemme try it as well. thanks for the suggestion.

DesolatorMagno 2021-05-23 22:00:47
show the line
DesolatorMagno 2021-05-23 22:01:02
(the code line)
SureshLaraDev 2021-05-23 22:01:22
// $request->supp_image->move(public_path(). ‘/images/’,$newUpdatedImage);
$request->supp_image->move(public_path(‘/images/’),$newUpdatedImage);
SureshLaraDev 2021-05-23 22:01:34
SureshLaraDev 2021-05-23 22:01:22
// $request->supp_image->move(public_path(). ‘/images/’,$newUpdatedImage);
$request->supp_image->move(public_path(‘/images/’),$newUpdatedImage);

this works on update function

SureshLaraDev 2021-05-23 22:01:46
$request->supp_image->move(public_path(‘images’),$newImageName);
SureshLaraDev 2021-05-23 22:01:56
$request->supp_image->move(public_path(‘images’),$newImageName);
SureshLaraDev 2021-05-23 22:02:25
SureshLaraDev 2021-05-23 22:01:56
$request->supp_image->move(public_path(‘images’),$newImageName);

this one worked inside store function

SureshLaraDev 2021-05-23 22:04:53
SureshLaraDev 2021-05-23 22:01:22
// $request->supp_image->move(public_path(). ‘/images/’,$newUpdatedImage);
$request->supp_image->move(public_path(‘/images/’),$newUpdatedImage);

this thing works on both the methods. better I follow this. dir prob.

SureshLaraDev 2021-05-23 22:05:08
acting weird
DesolatorMagno 2021-05-23 22:07:58
I guess the public path should return the/public/location
Them if you add images it becomes

the/public/locationimages, so it should be necesary to add a slash first but not at the end, because the second paramether should be simply the name.

SureshLaraDev 2021-05-23 22:10:38
DesolatorMagno 2021-05-23 22:07:58
I guess the public path should return the/public/location
Them if you add images it becomes

the/public/locationimages, so it should be necesary to add a slash first but not at the end, because the second paramether should be simply the name.

yes..as u said. It becomes /location..i removed the slash at the end (like u said), It worked fine. gg bro. learnt a new behaviour of laravel . Thanks for the info.

DesolatorMagno 2021-05-23 22:23:05
$user->avatar = $request->avatar->store(”, $this->disk);

I prefer to do something like these, that way it give a unique name and store the file.

DesolatorMagno 2021-05-23 22:24:56
laravel_discuss-82402.jpg
There is a couple of example in the documentation of easier way to store files, but seems like ppl like to generate the name and move it, taking more steps and making it easier to get it wrong.
SureshLaraDev 2021-05-23 22:32:28
DesolatorMagno 2021-05-23 22:24:56
There is a couple of example in the documentation of easier way to store files, but seems like ppl like to generate the name and move it, taking more steps and making it easier to get it wrong.

thanks bro. I will follow this

SureshLaraDev 2021-05-23 22:33:20
Now one issue..How to remove the old files. when I try to update it, old file remains in the public dir.
DesolatorMagno 2021-05-23 22:34:15
laravel_discuss-82405.jpg
and in path would be $user->avatar
DesolatorMagno 2021-05-23 22:34:28
https://laravel.com/docs/8.x/filesystem#deleting-files
SureshLaraDev 2021-05-23 22:34:43
thanks bro..
VAIBHAVJAIN1928 2021-05-23 23:55:32
Is there any example of broadcasting with laravel, pusher, ajax, events with crud functionality??
natghi2010 2021-05-24 00:14:59
What is a facade?
natghi2010 2021-05-24 00:15:25
I cant understand what is written in the documentation
sobirjonovs 2021-05-24 00:20:32
natghi2010 2021-05-24 00:14:59
What is a facade?

Facade is just a class that lets the programmer to access the main classes method or properties statically.

natghi2010 2021-05-24 00:21:10
sobirjonovs 2021-05-24 00:20:32
Facade is just a class that lets the programmer to access the main classes method or properties statically.

what do you mean ‘main classes’?

sobirjonovs 2021-05-24 00:37:18
natghi2010 2021-05-24 00:21:10
what do you mean ‘main classes’?

If you noticed that each Facade classes have accessor. I mean that accessor.

DesolatorMagno 2021-05-24 01:18:31
It’s like a shortcut.
natghi2010 2021-05-24 02:38:48
I saw the quiz api on this and it’s amazing
|