PHP code example of tonning / flashable
1. Go to this page and download the library: Download tonning/flashable 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/ */
tonning / flashable example snippets
use Tonning\Flashable\Flashable;
class Post extends Model
{
use Flashable;
...
}
public function getModelName() {
return 'Blog post';
}
protected $flashable = [
'created' => 'Your blog post have been created. Good job!',
'updated' => 'I hope nobody saw those mistakes...',
'deleted' => 'Be gone blog post!'
]