I am using laravel and I want to restore child when I restore parent for example I’ve removed a user and every user has a shop so shop was deleted with $cascadeDeletes and all child related to user …
Tag: laravel
How can i remove the key which contain the value white space in PHP, Laravel?
In the end there is no comma and no issue and in the database everything is fine Now problem is that when i put a comma in the end there is a cell created in the database with whitespace I know why this happening. The last key of the exploded array containing value is whitespace. But i want to omit
How to fetch product name from orders table which contain product_id in laravel?
I am unable to fetch the product name according to matching id but i am getting same name in table as shown below this is the ordered list of products Please check table for reference ill be showing below (order_list table) order_list table Table products products table My Controller please Help me out as i a…
How to redirect to the page which shows only the data inserted to the database from that id
For example if there is a form which creates customers, and when you filled the form and submit the page should redirect and show the data which was inserted to that form by a specific individual id. …
How to solve Array to string conversion Error?
here user can select multiple foods. i want to save those food items to the database. I have column named “food” in the database i want to save all those selected food items in this column. just like …
Paginating with laravel collection in api
I got problem in Laravel Api collection paginate. I have categories and I need to bring all products that belongs to a single category My code: public function show($id) { $category = Category:…
“file_get_contents(http://127.0.0.1:8000/storage/config/xxx.ini): failed to open stream: HTTP request failed! ”
I got this error message when trying to send form data post request via POST method. “file_get_contents(http://127.0.0.1:8000/storage/config/xxx.ini): failed to open stream: HTTP request failed! ” …
Laravel 5.8, CRUD when editing image didn’t show up (blade)?
I try to create edit blade to get old value from database. the title successfully appears, but the image and body (textarea) didn’t appears, here is some code of my edit.blade.php <form action="{{…
Data type of ‘password’ field for manual input in phpmyadmin for Laravel application?
In my Laravel application I have two type of Users. One is ‘Admin’ and another is ‘Users’. For Admin I want to input an ‘username’ and ‘password’ manually to the database. So what’s the data type of …
Sorting of columns by joining two tables in Laravel
I have two tables books and publishers. publisher_id is primary key in publishers table and foreign key in books table. In index.blade.php of books, I want to create link for sorting of columns of …