PHP code example of marekmiklusek / laravel-starter-kit-livewire
1. Go to this page and download the library: Download marekmiklusek/laravel-starter-kit-livewire 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/ */
marekmiklusek / laravel-starter-kit-livewire example snippets
Schedule::command('db-backup:run')
->dailyAt('02:00')
->onOneServer()
->runInBackground();
use Illuminate\Support\Facades\Log;
Log::error('User not found', ['user_id' => 42]);
'level' => 'error', // debug | info | warning | error | critical
'silent_notification' => false, // true = no sound/vibration
'is_enabled' => env('TELEGRAM_LOGGER_ENABLED', true),
it('displays the login page', function () {
$page = visit('/login');
$page->assertSee('Log in')
->assertNoJavascriptErrors();
});
use Livewire\Livewire;
it('can update user profile', function () {
$user = User::factory()->create();
Livewire::actingAs($user)
->test(\App\Livewire\Settings\Profile::class)
->set('name', 'New Name')
->call('save')
->assertHasNoErrors()
->assertDispatched('profile-updated');
expect($user->fresh()->name)->toBe('New Name');
});
lang/
├── en.json # UI strings (English)
├── cs.json # UI strings (Czech)
├── en/
│ ├── auth.php # Authentication messages
│ ├── passwords.php # Password reset messages
│ ├── pagination.php # Pagination labels
│ └── validation.php # Validation messages
└── cs/
├── auth.php
├── passwords.php
├── pagination.php
└── validation.php
bash
php artisan user:create