PHP code example of glhd / aire

1. Go to this page and download the library: Download glhd/aire 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/ */

    

glhd / aire example snippets


{{ Aire::open()
  ->route('users.update')
  ->bind($user) }}

{{ Aire::input('given_name', 'First/Given Name')
    ->id('given_name') }}
    
{{ Aire::input('family_name', 'Last/Family Name')
    ->id('family_name')
    ->autoComplete('off') }}
  
{{ Aire::email('email', 'Email Address')
    ->helpText('Please use your company email address.') }}
  
{{ Aire::submit('Update User') }}
  
{{ Aire::close() }}

return [
  'default_classes' => [
    'input' => 'text-gray-900 bg-white border rounded-sm',
  ],
];

// Bind Eloquent models
Aire::bind(User::find(1));

// Bind an array
Aire::bind(['given_name' => 'Chris']);

// Bind any object
Aire::bind((object) ['given_name' => 'Chris']);

// In routes
Route::delete('/photos/{photo}', 'PhotosController@destroy')
	->name('photos.destroy');

// In your view
{{ Aire::open()->route('photos.destroy', $photo) }}
{{ Aire::close() }}

// Print "There are X errors on this page that you must fix before continuing."
{{ Aire::summary() }}

// Also 
bash
php artisan vendor:publish --tag=aire-translations