PHP code example of codewiser / inarticulate

1. Go to this page and download the library: Download codewiser/inarticulate 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/ */

    

codewiser / inarticulate example snippets


public $incrementing = false;

/**
 * @property mixed id
 * @property string title
 * @property string body
 */
class Article extneds \Codewiser\Inarticulate\Model
{
    protected $attributes = [
        'title' => null,
        'body' => null
    ];
}


$article = new Article();

$article->exists; // FALSE

$article->id = 1;
$article->title = "Title";
$article->save();

$article->exists; // TRUE


$article = Article::query()->findOrFail(1);

echo $article->title; 


Model::all();
// or
Model::query()->get();