Skip to content

Tag: laravel

Two models for one Controller in Laravel (methods Edit & Update)

Would you please let me know if this controller SerieController is correct? As I don’t think so. There are two models in fact. One Model is Serie and the other is Mark. When, I click on the drop down list, I don’t see my items… My edit.blade.php Concerning the model Model Serie Model Mark Th…

Laravel download pdf returning random characters

Im trying to download my earlier saved pdf. Ive created this function. And it returns this: Var dumping my $filepath is resulting in this : C:laragonwwwYTBNstorage/pdf/billing/invoice/YTBN_Armando_3_2019-0305.pdf” Which is correct. Answer try to used like that or u can used directly in laravel 5.5 file …

fetch related records between 3 model

I have few products in 3 category (for example), and each product has a brand. I want to show brands which related to products in a specific category. Models: –product –brand –category relations: category has many products brand has many products How can I do that? Answer Considering you hav…

Laravel paginate pivot tables

I have collections which contains custom products I need to paginate those collections products but I receive error. data With this query I can get my collection and it’s products but I’m not able to paginate products. $collection = Collection::where(‘slug’, $slug)->where(‘sta…