PHP code example of bekusc / laravel-auto-validation
1. Go to this page and download the library: Download bekusc/laravel-auto-validation library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
class UserController extends Controller
{
public function register(Request $request)
{
// The incoming request is valid...
User::create($request->all());
}
public function update(Request $request)
{
// The incoming request is valid...
$request->user()->update($request->all());
}
}