return $this->hasOne(Client::class,'gender_code','gender_code'); laravel
//id for single
$user->reasons->attach($reasonId);
//array for multiple
$user->reasons->attach($reasonIds);
$user->save();Event::with(["owner", "participants" => function($q) use($someId){
$q->where('participants.IdUser', '=', 1);
//$q->where('some other field', $someId);
}])
Also in PHP:
- date("l",$date) php
- clearing services cache file in laravel
- convert date to day of year php
- check if key in array excist
- catch multiple exceptions php
- refresh php
- create seed file in laravel;
- conole print php
- check length php
- error php display
- convert string to int php
- array function in php
- enable reporting php development mode
- composer what to do get created laravel new project
- execute query and use die in php
- add item to array in php
- array reverce php
- 12 hrs for preg match with single and double digit in php
- duplicate in array in php
- date format php string
- enable warnings php
- Remove values from select list based on condition
- 500 error code laravel
- ext dom php