Skip to content
Advertisement

Tag: laravel

how to add data to validated request input bag

I need to add custom data to the request input array from my customRequest class I tried this way It’s do the trick with request()->all() but when I returned $request->validated() it’s not exist. how can I do it? Answer $request->validated() is returning only validated data (data in the request validator class). After validating the data you can add additional data

Getting Values Using API and Laravel

I make my first project with API. I need add this to my project: https://dokumentacja-inpost.atlassian.net/wiki/spaces/PL/pages/18153479/1.7.3+Shipment+Tracking I use in my project Laravel 8. I make composer require michalbiarda/shipx-php-sdk And I added this code to my controller” but its return: Not status 🙁 How can I get status from inputs by this API? Please help me Answer Probably you need to hit

Falling testing Laravel assertModelExists

Making a test for database with Laravel (8.44.0) assetion assertModelExists(), fails on an error. The test class looks like this What do you think is missing? Answer The assertModelExists method was added September 2021: https://github.com/laravel/framework/pull/38766 Version 8.44.0 was released May 2021: https://github.com/laravel/framework/releases/tag/v8.44.0 So just update Laravel to the latest 8.x release and you should be good to go.

Laravel Many to Many Relationship mixes up id’s in insert

I got the the problem, that the id’s of the FK’s for my pivot table get mixed up before insert and thus I get an error because a category with an ID that high isn’t available. Here’s how I try to insert: The Advertisement migration and class function: And here the category class function and migration: In the error message

I want to show a page inside another page [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 2 months ago. Improve this question Inside first picture, the page name master.blade.php. Where I want to insert header.blade.php coding {{view::make(‘header’)}}. But the render page show this error, saying “Class “view” not found

Why does uploaded images disapear after deployment?

I deployed a project made in Laravel 8 with Heroku , it was working fine , but after some time , the images disapeared, and the file where i store them doesn’t show : and made me upload them again , that problem happened multiple times since yesterday , that’s the code i used to store the images : what

Laravel get school users

I am making a project that will have schools that are already seeded into the database, one user has one school. User table has school_id I made this relationship: User.php School.php When i do I get every field from the school model but the users aren’t there,how do i make that the users appear there too without having to do?

Advertisement