I have a resource-collection to get all my dialogues. Because the frontend is already coded (by another person), I want to return all of those as an object, with the dialogue_id of the database as …
Tag: laravel
Call to a member function addEagerConstraints() on string
I want to calculate the average of the column of nested morph relation. Model Function public function trader_ratings() { return $this->morphMany(TraderRatings::class, ‘rateable’) ->…
Laravel – Auth installed but logout route not found
I made a laravel system and included the Auth scaffolding stated in the documentation. I installed it by using composer require laravel/ui –dev php artisan ui vue –auth And running npm install …
laravel, How to check if this is the last record
how can I check if the current record is the last one in the model? $lastorder=Order::find($order_id); if($lastorder->last())
How to play video from laravel storage directory after verifying the User Login
i have been developing a service where users will be able to access content only and only if they have paid for the content . so i am uploading the content to storage directory and for accessing …
How to plus values of multi arrays
Here is my code in blade Laravel: @php $serialize = array_map(“serialize”, $arrayplus); $uniqueSerialize = array_unique($serialize); $amountplus = array_map(“unserialize”, $uniqueSerialize); dd($…
function optional properties in php
I have one function by 2 optional property and how send value hight? function test($size=1,$hight=2){ // code ……… } test($hight) test(null,$hight); Is there any other way? I dont need test(…
How do I get all the invoice items in my edit page in laravel?
**I am new to laravel, so ignore any mistakes on asking question. I have created the invoice with multiple row table using jquery. Now I need to update the invoice items, so how do I fetch all invoice …
Cannot use object of type IlluminateDatabaseQueryBuilder as array
I cannot find the error here how do i fix this? $db2 = DB::connection(‘sqlsrv’)->table(‘Checkinout’) ->join(‘Z_MemRecord’,’Checkinout.Userid’,’=’,’Z_MemRecord.uid’) ->select(DB::raw(“…
How to validate at least one checkbox is checked in a loop in Laravel form?
I have a collection of checkboxes in my application. What I want to do is validate whether at least one is checked and enable a submit button. Basically a front end validation. According to the …