2017 © Pedro Peláez
 

library myhelpers

Owlcms with multi language helpers function, Theming system & Users system

image

rami-awadallah/myhelpers

Owlcms with multi language helpers function, Theming system & Users system

  • Wednesday, December 20, 2017
  • by ramiawadallah
  • Repository
  • 1 Watchers
  • 0 Stars
  • 46 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

composer require "rami-awadallah/myhelpers":"1.1.x-dev", (*1)

config\app.php --> providers array, (*2)

    Collective\Html\HtmlServiceProvider::class,
    DaveJamesMiller\Breadcrumbs\ServiceProvider::class,
    RamiAwadallah\Helpers\ServiceProvider::class,

config\app.php --> aliases array, (*3)

    'Form' => Collective\Html\FormFacade::class,
    'Html' => Collective\Html\HtmlFacade::class,
    'Btn' => RamiAwadallah\Helpers\Src\Btn::class,
    'bsForm' => RamiAwadallah\Helpers\Src\bsForm::class,
    'langForm' => RamiAwadallah\Helpers\Src\langForm::class,
    'MyRoute' => RamiAwadallah\Helpers\Src\Routes\MyRoute::class,
    'Files' => RamiAwadallah\Helpers\Src\Files\Files::class,
    'Control' => RamiAwadallah\Helpers\Src\Control::class,
    'Breadcrumbs' => DaveJamesMiller\Breadcrumbs\Facade::class,


     php artisan vendor:publish --force

app\Console\Kernel.php, (*4)

protected $commands = [
    ...
    Commands\Controller::class,
    Commands\View::class,    
];

app/Http/Kernel.php, (*5)

   protected $middlewareGroups = [
    'web' => [
        ...
        \App\Http\Middleware\LocaleMiddleware::class,
        \App\Http\Middleware\LogUserActivity::class,
    ],

  protected $routeMiddleware = [
    ...
    'maintenance' => \App\Http\Middleware\maintenance::class,
    'rule' => \App\Http\Middleware\Rules::class,
    'locale' => \App\Http\Middleware\Local::class,
];

app/Http/routes.php, (*6)

    MyRoute::shareVariables();
    MyRoute::system();


    \MyRoute::auth();
    group(['prefix'=>admin,'middleware'=>'auth'],function(){

    /* Language Route design */
       resource('langs', 'Backend\LangController', 'admin.langs');
       Route::post('admin/langs/store', array('as'=>'store_langs' ,'uses'=>'Backend\LangController@store') );
       Route::post('admin/langs', array('as' => 'update_file' , 'uses' => 'Backend\LangController@updateFiles'));

    /* Settings Route design */
       resource('settings', 'Backend\SettingsController','admin.settings');

    /* Settings Route design */
       resource('users', 'Backend\UsersController','admin.usesrs');

    /* Go to Admin Route design */
       get('/', 'Backend\HomeController@index','admin.index');

       /* Language changing Route design */
       get('backend/main_settings', 'Backend\SettingsController@index','main.settings');

       /* Users Route design */
       resource('users', 'Backend\UserController','admin.users');


      });

    Auth::routes();

    ...

database/seeds/DatabaseSeeder.php, (*7)

public function run()
{
    ...
    $this->call(LangsTableSeeder::class);
    $this->call(SettingSeeder::class);
    $this->call(UserSeeder::class);

}

Add this to AppServiceProvider, (*8)

  use Illuminate\Support\Facades\Schema; 
  use App\View\ThemeViewFinder;

  public function boot(){
      Schema::defaultStringLength(191);
      $this->app['view']->setFinder($this->app['theme.finder']);
      $this->app['view']->composer('layouts.home', Composers\InjectPages::class);
  }


  public function register(){
      $this->app->singleton('theme.finder', function ($app) {
          $finder = new ThemeViewFinder($app['files'], $app['config']['view.paths']);

          $config = $app['config']['cms.theme'];

          $finder->setBasePath($app['path.public'].'/'.$config['folder']);
          $finder->setActiveTheme($config['active']);

          return $finder;
      });
  }

In the composer add this code in the outload files, (*9)

  "files" : [
        "app/Helpers/helpers.php"
  ]

composer dump-autoload

php artisan migrate --seed

بعد الانتهاء من الخطوات السابقة ادخل على رابط 

admin, (*10)

وقم بتسجيل الدخول بهذا الحساب, (*11)

user : admin@owlcms.com, (*12)

pass : 123456, (*13)

The Versions

20/12 2017

1.5.x-dev

1.5.9999999.9999999-dev

Owlcms with multi language helpers function, Theming system & Users system

  Sources   Download

The Requires

 

by Rami Awadallah

10/10 2017

1.3.x-dev

1.3.9999999.9999999-dev

Owlcms with multi language helpers function, Theming system & Users system

  Sources   Download

The Requires

 

by Rami Awadallah

10/10 2017

1.4.x-dev

1.4.9999999.9999999-dev

Owlcms with multi language helpers function, Theming system & Users system

  Sources   Download

The Requires

 

by Rami Awadallah

05/10 2017

1.2.x-dev

1.2.9999999.9999999-dev

Owlcms with multi language helpers function, Theming system & Users system

  Sources   Download

The Requires

 

by Rami Awadallah

02/10 2017

1.1.x-dev

1.1.9999999.9999999-dev

Owlcms with multi language helpers function, Theming system & Users system

  Sources   Download

The Requires

 

by Rami Awadallah

01/10 2017

dev-master

9999999-dev

هذه الحزمة خاصة باطار عمل لارافل حيث تضيف خاصية التحكم باللغات وبعض الدوال المساعدة

  Sources   Download

The Requires

 

by Rami Awadallah