1. Go to this page and download the library: Download corepine/modal 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/ */
corepine / modal example snippets
namespace App\Livewire\Modals;
use App\Models\User;
use Corepine\Modal\Actions\Action;
use Corepine\Modal\Enums\ModalType;
use Corepine\Modal\Modal;
use Corepine\Support\Enums\Placement;
class EditUser extends Modal
{
public User $user;
public static function modalAttributes(): array
{
return [
'type' => ModalType::Modal,
'placement' => Placement::Center,
'origin' => Placement::Center,
'shell' => true,
'heading' => 'Edit User',
'description' => 'Update account details',
'showClose' => true,
'dismissible' => true,
'closeOnEscape' => true,
'actions' => [
Action::make('cancel')->label('Cancel')->close(),
Action::make('save')->label('Save')->primary()->action('save'),
],
];
}
}