Search
 
SCRIPT & CODE EXAMPLE
 

PHP

validation not exists with this id laravel

$e = Subscription::find($request->subscription_id);
$rules = [
  'subscription_id' => 'required|integer|exists:subscriptions,id',
  'date' => 'required|date|after:yesterday',
  'date' => Rule::unique('member_attendances')->where(function ($query) use ($e) {
              return $query->where('member_id', $e->member_id);
})
//|unique:member_attendances,date,'.$e->member_id . ',member_id',
];
Comment

validation not exist in table laravel

    public function rules()
    {
        return [
            'phone_number' =>[
              'required' ,
              'unique:users,phone_number'
            ],
        ];
    }
Comment

PREVIOUS NEXT
Code Example
Php :: delete multiple row in laravel 
Php :: install phpstorm in ubuntu stable 
Php :: laravel access JsonResponse content 
Php :: get parameter php 
Php :: laravel get items by ids 
Php :: Fatal error: Allowed memory size of 1610612736 bytes exhausted 
Php :: how to play sound with php 
Php :: PHP scandir() Function 
Php :: how to define function in php 
Php :: laravel file permissions 
Php :: part of url php 
Php :: change password function in laravel 
Php :: how to get data from a table in laravel 
Php :: php loop through object 
Php :: change minutes in to hours carbon 
Php :: how to get current location latitude and longitude in php 
Php :: convert all text in php to uppercase 
Php :: PHP OOP - Classes and Objects 
Php :: php color generator 
Php :: symfony migrate fresh 
Php :: how to use a session in blade 
Php :: for loop in laravel 
Php :: php switch case multiple values per line 
Php :: php variable in string 
Php :: How to JSON encode a PHP array 
Php :: laravel select only some columns relationship 
Php :: laravel log path 
Php :: join array in php as string 
Php :: run a php site 
Php :: laravel assets 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =