1. Go to this page and download the library: Download clroma/bootstrap-4-form 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/ */
// Passing an existing, persisted model will trigger a model
// binded form.
$user = User::whereEmail('[email protected]')->first();
// Named routes
BootForm::open(['model' => $user, 'store' => 'users.store', 'update' => 'users.update']);
// Controller actions
BootForm::open(['model' => $user, 'store' => 'UsersController@store', 'update' => 'UsersController@update']);
// Passing a model that hasn't been saved or a null value as the
// model value will trigger a `store` form.
$user = new User;
BootForm::open()
// Open a vertical Bootstrap form.
BootForm::vertical();
// Open an inline Bootstrap form.
BootForm::inline();
// Open a horizontal Bootstrap form.
BootForm::horizontal();
// The label will be inferred as 'Username'.
BootForm::text('username');
// The field name by default is 'email'.
BootForm::email();
BootForm::textarea('profile');
// The field name by default is 'password'.
BootForm::password();
// A checked checkbox.
BootForm::checkbox('interests[]', 'Laravel', 'laravel', true);