src/Laito/Controller.php
public function store($attributes = [])
    {
        // Set the attributes
        $attributes = (!empty($attributes))? $attributes : $this->app->request->input();

        // Create the record
        $result = $this->model->create($attributes);

        // Return results
        return [
            'success' => true,
            'id' => $result['id'],
            'data' => $result
        ];
    }
public function store($attributes = [])
    {
        // Set the attributes
        $attributes = (!empty($attributes))? $attributes : $this->app->request->input();

        // Create the record
        $result = $this->model->create($attributes);

        // Return results
        return [
            'success' => true,
            'id' => $result['id'],
            'data' => $result
        ];
    }
public function store ( $ attributes = [ ] ) { // Set the attributes $ attributes = ( ! empty ( $ attributes ) ) ? $ attributes : $ this -> app -> request -> input ( ) ; // Create the record $ result = $ this -> model -> create ( $ attributes ) ; // Return results return [ 'success' => true , 'id' => $ result [ 'id' ] , 'data' => $ result ] ; }
Stores a newly created resource in storage

@param array $params Resource attributes
@return array Response
Stores a newly created resource in storage