1. Go to this page and download the library: Download alexwenzel/cmsbasics 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/ */
alexwenzel / cmsbasics example snippets
class Post extends \Eloquent {
protected $table = 'posts';
protected $fillable = ['title', 'body'];
public static $rules = [
'title' => '
use Alexwenzel\Cmsbasics\Controllers\Resource;
class PostsController extends Resource {
public function __construct(Post $model)
{
parent::__construct([
'dependency' => $model,
'resource_name' => 'posts',
'view_dir' => 'path.to.views',
]);
}
}
Route::resource('posts', 'PostsController');
protected function _index_items()
protected function _store_data()
protected function _store_validator($data)
protected function _store_fails($data, $validator)
protected function _store_finished($data, $model)
protected function _update_data()
protected function _update_validator($id, $data)
protected function _update_fails($data, $model, $validator)
protected function _update_finished($data, $model)
protected function _destroy_finished()
class PostsController extends Resource {
public function __construct(Post $model)
{
parent::__construct([
'dependency' => $model,
'resource_name' => 'posts',
'view_dir' => 'path.to.views',
]);
}
}
`
php artisan view:publish alexwenzel/cmsbasics
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.