Laravel patch method not supported (even on update method)

HTML PATCHING FORM {{ Form::model($model , [ ‘route’ => [‘admin.friendship.update’, $model->id] , ‘class’=>’needs-validation ajax-form’, ‘method’ => ‘post’ ]) }} @…

how to get all user based on where condition and compare this result with another condition in laravel eloquent

I have a user table column referred_by: I have a view for step 1 user like where referred_by=auth::user()->id In here whoever registered by this user referal link will be shown in this table: I …

Can’t get a list of streets to create a card [closed]

public function create() { $streets = street::get(); return view(‘dashboard.house.created’); } public function store(Request $request) { $this->validate($request, [ …

How to get instance of a collection in Laravel 8 to use in a if statement?

How to get instance of a collection in Laravel 8? I want to make a if statement if $event->like (CODE BELOW) does not exists for that specific event and an else statement I want to execute the …

Laravel | Why is the id missing in a eloquent model?

We are customizing our key to use a unique identifier in our routing. So this http://127.0.0.1:8000/TEAMS/1 ends up like this http://127.0.0.1:8000/TEAMS/91e11f44-2d89-4b5e-83e0-5cb92d0c0ebd This …

How to use print all comments for respective posts using relationship in Laravel 8

I am trying to print all comments per post using the relationship, Error: Property [comments] does not exist on the Eloquent builder instance. Post Model class WorkTravel extends Model { use …

Laravel Eloquent – Query with multiples parameters

I’m new to the Laravel framework and I could need a little help from you. Could someone help me to convert this request into Eloquent ? SELECT * FROM `non_working_days` WHERE YEAR(date) = “2021&…

Trying to get property ‘approval_code’ of non-object

I’m trying to build a task scheduler for sending email routine and i got this error when i try to get approval_code from auth. Here are my code in mail: <?php namespace AppMail; use Illuminate…

How to display a table according to a foreign key which is display from another foreign key / Laravel 6

Model: public function followup() { return $this->hasMany(‘AppFollowUp’, ‘id_log’, ‘id’) ->select([‘id’, ‘id_log’, ‘request’, ‘id_priority’]); } follow_up.id_priority is a foreign key …

Laravel Model not loaded with data when trying to delete

I have one link as below: transfer_id) }}’> It gets parsed by the following route: …