laractions 0.1.0

Actions for Laravel Rust: encapsulate business logic in classes that run now or on the queue.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use laractions::action;
use serde::{Deserialize, Serialize};

#[derive(Debug, Default, Serialize, Deserialize)]
pub struct {{ class }} {}

#[action]
impl {{ class }} {
    async fn handle(&self) -> laravel::Result<()> {
        // Implement action logic here

        Ok(())
    }
}