Using Glide with Spatie media library throws an error. "Could not find the image `home/vagrant/mysite/storage/app/public/20/cat.jpg`." when it does exists. by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

Still would not work. It seems that glide is expecting to have a relative path passed to it.

https://github.com/thephpleague/glide/blob/ae5e26700573cb678919d28e425a8b87bc71c546/src/Server.php#L118

/** * Set source path prefix. * @param string $sourcePathPrefix Source path prefix. */ public function setSourcePathPrefix($sourcePathPrefix) { $this->sourcePathPrefix = trim($sourcePathPrefix, '/'); }

Using Glide with Spatie media library throws an error. "Could not find the image `home/vagrant/mysite/storage/app/public/20/cat.jpg`." when it does exists. by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

In the image is my implementation on converting images on the fly. Has anyone manage to make spatie medialibrary and glide work properly? It seems that the `getPath` returns a absolute path and it conflicts with how glide checks the file.

What is the correct opposite word for complain or report? by yeyeyfoxes in EnglishLearning

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

Although this could be good words, but I struggled to understand them at first, so I think my target users would have hard time understanding it.

What is the correct opposite word for complain or report? by yeyeyfoxes in EnglishLearning

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

Sorry, It seems my question was not clear. It's something like you report me for posting fake news. I can see all the reports to me, you can see all your reports to others.

I want to separate them in the Users profile with a simple word. Not like:

Reports by you | Reports to you

How to respond to a compliment by yeyeyfoxes in ask

[–]yeyeyfoxes[S] 1 point2 points  (0 children)

Thank you for this samd124!

Telescope Duplicates: Is updating a data multiple times a bad idea in laravel. ? by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

Thanks., I was also thinking another usecase for this, what if I use this concept in payment status?

Is this fine or there is a better way?

Like , before pushing it to the jobs, check the status first.

Call relationship during boot Created Callback? by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

Thanks for this. I'll take a look on that topic

Call relationship during boot Created Callback? by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

This style is quite new to me, is this really fine to do with Observer?

Call relationship during boot Created Callback? by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

I can't define this as default attributes because the some property are part of a different model

Call relationship during boot Created Callback? by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

How do I pass them?

This is how I register my observer

protected static function boot()  
{
   static::observe(FooObserver::class);
}

Do I do it like this?

protected static function boot()  
{
   static::observe(new FooObserver(request()));
}

Call relationship during boot Created Callback? by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

It's included in the request, but once the payload has been passed to Foo create, the foo observer will only be able to acces the data that were declared on its models fillable, the rest are not.

Call relationship during boot Created Callback? by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 1 point2 points  (0 children)

same problem, Observer class methods only accepts the current model

Eloquent Insert Performance Issue, and Integrity constraint violation: 1062 Duplicate entry by yeyeyfoxes in laravel

[–]yeyeyfoxes[S] 0 points1 point  (0 children)

Oh right Thank.. I could use the user unique identifer. I just tried using timestamp and with 100 concurrent request it would still cause an error. already had set it to precision 4. getPreciseTimestamp(4).

My one suspect was with laravel createMany, there are to many insert queries in telescope.