All Projects → xsanisty → Silexstarter

xsanisty / Silexstarter

Licence: mit
Starter app based on Silex framework with mvc and modular arch, scaffold generator, and admin panel

Projects that are alternatives of or similar to Silexstarter

app
Aplus Framework App Project
Stars: ✭ 338 (+2972.73%)
Mutual labels:  composer, mvc
Desenvolvimento-Android-do-absoluto-zero-para-iniciantes
Visite meu site e conheça todos os meus cursos 100% on-line.
Stars: ✭ 33 (+200%)
Mutual labels:  crud, mvc
mvc
PHP MVC boilerplate with user authentication, basic security and MySQL CRUD operations.
Stars: ✭ 28 (+154.55%)
Mutual labels:  crud, mvc
.NET-Core-Learning-Journey
Some of the projects i made when starting to learn .NET Core
Stars: ✭ 37 (+236.36%)
Mutual labels:  crud, mvc
Jsonapidotnetcore
JSON:API Framework for ASP.NET Core
Stars: ✭ 465 (+4127.27%)
Mutual labels:  crud, mvc
sql-repository
[PHP 7] SQL Repository implementation
Stars: ✭ 37 (+236.36%)
Mutual labels:  composer, crud
php-mvc
PHP MVC ⦿ Dockerized • Composer • RESTful API • Memcached • cron • WebSocket
Stars: ✭ 17 (+54.55%)
Mutual labels:  composer, mvc
velox
The minimal PHP micro-framework.
Stars: ✭ 55 (+400%)
Mutual labels:  crud, mvc
Yaldash
👻 It's never been easier to build and customize admin panels. Yah! yaldash is a beautifully designed administration panel for Laravel.
Stars: ✭ 338 (+2972.73%)
Mutual labels:  crud, admin-dashboard
ASP.NET-Core-2-MVC-CRUD-datatables-jQuery-Plugin
Asp.Net Example implementation of datatables.net using Asp.Net Core 2 Mvc CRUD datatables jQuery Plugin
Stars: ✭ 25 (+127.27%)
Mutual labels:  crud, mvc
titan-starter-website
A Laravel Website and Admin starter project that helps you with the setup.
Stars: ✭ 51 (+363.64%)
Mutual labels:  crud, admin-dashboard
Sleepingowladmin
🦉 Administrative interface builder for Laravel (Laravel admin)
Stars: ✭ 671 (+6000%)
Mutual labels:  crud, composer
tefact
🏭 (Beta) 轻量级无代码/低代码 H5、表单编辑器。Lightweight no-code/low-code editor for website、H5 page and Form. Build your page without code!
Stars: ✭ 244 (+2118.18%)
Mutual labels:  crud, admin-dashboard
wordpress-scaffold
The scaffold for GRRR's WordPress Pro setup.
Stars: ✭ 16 (+45.45%)
Mutual labels:  composer, scaffold
softn-cms
Sistema de gestión de contenidos
Stars: ✭ 22 (+100%)
Mutual labels:  mvc, admin-dashboard
drevops
💧 + 🐳 + ✓✓✓ + 🤖 + ❤️ Build, Test, Deploy scripts for Drupal using Docker and CI/CD
Stars: ✭ 55 (+400%)
Mutual labels:  composer, scaffold
Appsmith
Low code project to build admin panels, internal tools, and dashboards. Integrates with 15+ databases and any API.
Stars: ✭ 12,079 (+109709.09%)
Mutual labels:  crud, admin-dashboard
Filebase
A Simple but Powerful Flat File Database Storage.
Stars: ✭ 235 (+2036.36%)
Mutual labels:  crud, composer
eloquent-mongodb-repository
Eloquent MongoDB Repository Implementation
Stars: ✭ 18 (+63.64%)
Mutual labels:  composer, crud
Vuetify Admin Dashboard
A Crud Admin panel made from Vue js and Vuetify
Stars: ✭ 481 (+4272.73%)
Mutual labels:  crud, admin-dashboard

[Build Status] (https://scrutinizer-ci.com/g/xsanisty/SilexStarter/build-status/develop) [Scrutinizer Code Quality] (https://scrutinizer-ci.com/g/xsanisty/SilexStarter/?branch=develop) [Code Coverage] (https://scrutinizer-ci.com/g/xsanisty/SilexStarter/?branch=develop) [SensioLabsInsight] (https://insight.sensiolabs.com/projects/a30a66f9-8110-40c5-8a35-f3c1697dde55)

screenshot

SilexStarter

SilexStarter is a starter application built on the top of Silex framework, Laravel's Eloquent, Cartalyst Sentry, and some other third party and built in components. SilexStarter aim to help building simple application faster, it built with MVC and modular approach in mind, and comes with some basic admin module, including user manager, and module manager.

Installation

For now, the installable branch is only develop branch, you can easily install it using composer by using following command

composer create-project xsanisty/silexstarter target_dir dev-develop -s dev

once composer install is completed, you can initialize the app using following command

$cd target_dir
$./xpress app:init

Module can be developed directly inside the app/modules directory and create module on its own namespace or build it as separate composer package, module can be enabled or disabled by registering it in app/config/modules.php

Route

file : app/routes.php Route configuration can be created like normal Silex route, or using route builder using similar syntax like Laravel's route.

Silex routing style

/* the application instance is available as $app in context of route.php */

$app->get('/page', function(){
    return 'I am in a page';
});

$app->post('/save', function(){
   return 'Ok, all data is saved!';
});

/* grouping */
$app->group('prefix', function() use ($app) {
    $app->group('page', function() use ($app) {
        $app->get('index', function(){
            return 'I am in prefix/page/index';
        });
    });
});

/* resourceful controller */
$app->resource('prefix', 'SomeController');

/* route controller */
$app->controller('prefix', 'SomeController');

Laravel routing style

/* route can be built using the Route static proxy */

Route::get('/page', function(){
    return 'I am in a page';
});

Route::post('/save', function(){
   return 'Ok, all data is saved!';
});

/* grouping */
Route::group('prefix', function() {
    Route::group('page', function() {
        Route::get('index', function(){
            return 'I am in prefix/page/index';
        });
    });
});

/* resourceful controller */
Route::resource('prefix', 'SomeController');

/* route controller */
Route::controller('prefix', 'SomeController');

Controller

file: app/controllers/*

Controller basically can be any classes that reside in controllers folder, it will be registered as service when enabled, and will be properly instantiated when needed, with all dependency injected.

Assume we have PostRepository and CommentRepository, we should register it first before it can be properly injected into controller.

file: app/services/RepositoryServiceProvider.php

<?php

use Silex\Application;
use Silex\ServiceProviderInterface;

class RepositoryServiceProvider implements ServiceProviderInterface
{
    public function register(Application $app)
    {
        $app['PostRepository'] = $app->share(function (Application $app) {
            return new PostRepository
        });

        $app['CommentRepository'] = $app->share(function (Application $app) {
            return new PostRepository
        });
    }

    public function boot(Application $app)
    {

    }
}

file: app/config/services.php

<?php

return [
    'common' => [
        'RepositoryServiceProvider',
    ]
]

file: app/controllers/PostController.php

<?php

class PostController{

    protected $postRepo;
    protected $commentRepo;

    public function __construct(PostRepository $postRepo, CommentRepository $commentRepo)
    {
        $this->postRepo = $postRepo;
        $this->commentRepo = $commentRepo;
    }

    public function index(){
        return Response::view('post/index', $this->postRepo->all());
    }
}

and now, we should able to create route map to this controller

Route::get('/post', 'PostController:index');

Model

file: app/models/*

SilexStarter use Eloquent ORM as database abstraction layer, so you can extends it to create model classJeyac. The configuration of the database can be found in app/config/database.php

<?php

class Post extends Model{
    protected $table = 'posts';

    public function comments(){
        return $this->hasMany('Comment');
    }
}

View

file: app/views/*

Middleware

file: app/middlewares.php

Service Provider

file: src/Providers/*

Module

file: app/modules/*

Register module

file: app/config/modules.php

Module Provider

file: app/modules/**/ModuleProvider.php

Menu

Asset

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].