We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello I'm unable to call any method from the livewire component
<?php use Illuminate\Support\Facades\Route; use App\Livewire; Route::middleware([ 'auth:sanctum', config('jetstream.auth_session'), 'verified', ])->group(function () { Route::prefix(\Mcamara\LaravelLocalization\Facades\LaravelLocalization::setLocale()) ->middleware(['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']) ->group(function () { // Dashboard Route::get('/', Livewire\Pages\Dashboard::class)->name('dashboard'); // Game Routes Route::prefix('game')->group(function () { // Crimes Route::get('/crimes', Livewire\Game\Crimes::class)->name('crimes'); // Inventory Route::get('/inventory', Livewire\Game\Inventory::class)->name('inventory'); }); // Livewire Routes \Livewire\Livewire::setUpdateRoute(function ($handle) { return Route::post('/livewire/update', $handle); }); }); });
<form wire:submit.prevent="commit({{ $crime->id }})" class="mt-3"> <x-button type="submit" class="w-full py-2 px-4 h-10 text-center flex justify-center space-x-2 items-center" wire:loading.attr="disabled"> <span wire:loading.remove>{{ __('Commit') }}</span> <span wire:loading> {{ __('Committing...') }} </span> </x-button> </form>
<?php namespace App\Livewire\Game; use Illuminate\Support\Facades\Redirect; use Livewire\Component; use Masmerise\Toaster\Toastable; class Crimes extends Component { use Toastable; public function render() { $location = auth()->user()->character->location; return view('game.crimes', compact('location')) ->title(__('crimes.title')); } public function commit(int $crimeId): Redirect { flash('The crime has been committed.')->success(); $this->warning('The quantity on hand is critically low.'); return $this->redirect(route('crimes')); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello
I'm unable to call any method from the livewire component
The text was updated successfully, but these errors were encountered: