custom rule laravel validation
unique:users,username,id,1 // table, field, idcolumn, value to ignorepublic function store()
{
$this->validate(request(), [
'song' => [function ($attribute, $value, $fail) {
if ($value <= 10) {
$fail(':attribute needs more cowbell!');
}
}]
]);
}
Also in PHP:
- base url in php
- alter seeder in laravel
- apagar cache laravel
- automatically refresh a php code
- convert base64 to image php
- date_format timeformat php
- PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Sp ecified key was too long; max key length is 1000 bytes")
- clear nuget cache
- dispaly eroor php
- blob image to base64 php
- check if all values in array are equal php
- check if after specific position has string php
- display current date in php
- check if a char is in a string php
- fetch data from phpmyadmin
- check if astring is apart of another string in php
- clear laravel cache telescope
- How to execute “php artisan migrate” and other Laravel commands in remote server?
- determine type in function php
- aadd day in date php
- dateformat j/m/a php
- codeigniter insertID
- add 2 days in php
- Multiple image upload with CodeIgniter