get linked data from user table in laravel
I have this linkUser Table id | User Id | LinkedUser ID 1 4 6 2 6 4 3 1 6 4 6 1 5 1 2 6 6 3 7 3 6 and then there is user table id…
I have this linkUser Table id | User Id | LinkedUser ID 1 4 6 2 6 4 3 1 6 4 6 1 5 1 2 6 6 3 7 3 6 and then there is user table id…
I want to create api using laravel for fetch image which are stored in database in blob format but getting this errors public function show() { $product= Product::all(); return response($product); } details errors
One part of the goal here is to deepen my knowledge about the framework, so even if this isn’t “the right way”, I’d still like to try a solution to check if I should proceed with sanctum or passport. Basic…
I have two mysql table with HasMany/belongsTo relation like this : public function Products() { return $this->hasMany(Prices::class, 'product_id'); } public function Prices() { return $this->belongsTo(Products::class); } If i do the following function, i can get the latest price for every…
I'm calling this: request()->validate($rules); If there is an error, then Laravel will flash the errors to the session and return to the previous page. How do I get the errors that Laravel flashed to session from within PHP? I am…
I am doing data output with pagination on laravel. Everything works great. I have my own pagination template. It's written like this: {{ $houses->links('catalogs.paginate') }} However, when I still search for data on the page by some parameters, the GET…
I'm working on a countdown website where I have 2 forms in the same view, every time I submit 1 of those forms I'm getting a error that says: "message": "The POST method is not supported for route /. Supported…
I have successfully implemented the fetching of data, Am using loop to fetch the data. how do i pass it to collection; my data now looks like when i try returning from the controller direct to the view: 0 :…
I have a Laravel 8.x project that have been running on PHP 7.4 for a couple of years now and I would like to start planning the upgrade for Laravel to v9.x and v10.x. Before upgrading Laravel I thought I…
I have table "Jobs" having a field called "empids". we are storing comma separated employee ids in this field, for ex. 1,12,56. I am trying to return JSON using with() method by making belongsTo relation ship between Job and employee…