From 43e5d0bebfa3b57ddc9b783c0ef7cce72811d137 Mon Sep 17 00:00:00 2001 From: Virgil-Adrian Teaca Date: Mon, 19 Mar 2018 09:35:13 +0200 Subject: [PATCH] Overall improvements --- .gitignore | 1 + .htaccess | 1 - README.md | 34 +-- VERSION.txt | 1 + app/.htaccess | 1 - app/Bootstrap.php | 3 + app/Config.php | 11 +- app/Config/App.php | 283 ++++++------------ app/Config/Auth.php | 45 ++- app/Config/Broadcasting.php | 5 +- app/Config/Cache.php | 25 +- app/Config/Compile.php | 21 -- app/Config/Console.php | 31 -- app/Config/Database.php | 94 +----- app/Config/Languages.php | 31 +- app/Config/Mail.php | 56 ++-- app/Config/Packages.php | 110 +++++++ app/Config/Plugins.php | 50 ---- app/Config/Profiler.php | 13 + app/Config/Queue.php | 10 +- app/Config/ReCaptcha.php | 14 + app/Config/Routing.php | 41 +++ app/Config/Services.php | 22 -- app/Config/Session.php | 132 +------- app/Config/View.php | 1 + app/Console/Bootstrap.php | 55 ++++ app/Console/Kernel.php | 43 --- app/Controllers/BaseController.php | 134 +++------ app/Controllers/Pages.php | 36 ++- .../2017_09_15_074021_create_users_table.php | 39 +++ ...017_09_15_091222_create_session_table.php} | 1 + ... 2017_09_15_092106_create_cache_table.php} | 1 + ..._02_21_150531_create_failed_jobs_table.php | 37 +++ .../2018_02_21_150533_create_jobs_table.php | 37 +++ app/Database/Seeds/DatabaseSeeder.php | 4 +- app/Database/Seeds/UsersTableSeeder.php | 34 +++ app/Events.php | 48 +++ app/Events/Event.php | 9 - app/Http/Kernel.php | 49 --- app/Http/Requests/Request.php | 11 - app/Jobs/Job.php | 22 -- app/Language/CS/messages.php | 16 +- app/Language/CZ/messages.php | 35 +++ app/Language/DA/messages.php | 28 +- app/Language/DE/messages.php | 16 +- app/Language/EN/messages.php | 16 +- app/Language/ES/messages.php | 16 +- app/Language/FA/messages.php | 86 +++--- app/Language/FR/messages.php | 26 +- app/Language/HU/messages.php | 56 ---- app/Language/IT/messages.php | 16 +- app/Language/JA/messages.php | 16 +- app/Language/NL/messages.php | 16 +- app/Language/PL/messages.php | 16 +- app/Language/RO/messages.php | 16 +- app/Language/RU/messages.php | 106 ++++--- app/{Http => }/Middleware/EncryptCookies.php | 2 +- app/Middleware/HandleProfiling.php | 135 +++++++++ app/Middleware/MarkNotificationAsRead.php | 64 ++++ .../Middleware/RedirectIfAuthenticated.php | 2 +- app/{Http => }/Middleware/VerifyCsrfToken.php | 2 +- app/Models/User.php | 30 ++ app/{ => Platform}/Exceptions/Handler.php | 6 +- app/Platform/Start.php | 209 +++++++++++++ app/Policies/.gitkeep | 0 app/Providers/AppServiceProvider.php | 8 +- app/Providers/AuthServiceProvider.php | 3 +- app/Providers/BroadcastServiceProvider.php | 35 +-- app/Providers/EventServiceProvider.php | 16 + app/Providers/RouteServiceProvider.php | 17 +- app/Routes/Api.php | 4 +- app/Routes/Channels.php | 4 +- app/Routes/Console.php | 19 -- app/Routes/Web.php | 9 +- app/Start.php | 109 ------- app/Views/Default.php | 5 - app/Views/Default.tpl | 5 + app/Views/Emails/Notifications/Default.tpl | 199 ++++++++++++ app/Views/Emails/Notifications/Plain.tpl | 37 +++ app/Views/Errors/400.php | 6 +- app/Views/Errors/403.php | 4 +- app/Views/Errors/404.php | 26 +- app/Views/Errors/503.php | 2 +- app/Views/Layouts/Default.php | 36 --- app/Views/Layouts/Default.tpl | 37 +++ app/Views/Layouts/Static.php | 46 --- app/Views/Layouts/Static.tpl | 31 ++ app/Views/Pages/Home.php | 9 +- app/Views/Partials/Messages.php | 27 -- app/Views/Partials/Messages.tpl | 19 ++ app/Views/Static.tpl | 4 + assets/css/bootstrap-xl-mod.css | 261 ++++++++++++++++ assets/css/bootstrap-xl-mod.min.css | 1 + assets/css/style.css | 17 +- assets/images/users/no-image.png | Bin 8007 -> 0 bytes composer.json | 31 +- forge | 22 +- {app/Listeners => modules}/.gitkeep | 0 plugins/.htaccess | 1 - scripts/.htaccess | 1 - server.php | 7 +- shared/Language/CS/messages.php | 4 + shared/Language/DA/messages.php | 4 + shared/Language/DE/messages.php | 4 + shared/Language/EN/messages.php | 4 + shared/Language/ES/messages.php | 4 + shared/Language/FA/messages.php | 4 + shared/Language/FR/messages.php | 4 + shared/Language/IT/messages.php | 4 + shared/Language/JA/messages.php | 4 + shared/Language/NL/messages.php | 4 + shared/Language/PL/messages.php | 4 + shared/Language/RO/messages.php | 4 + shared/Language/RU/messages.php | 4 + shared/Support/helpers.php | 8 + storage/.gitignore | 3 +- storage/.htaccess | 1 - storage/files/quarantine/.gitignore | 2 - storage/files/thumbnails/.gitignore | 2 - {app/Models => themes}/.gitkeep | 0 scripts/makelangs.php => update.php | 59 +++- webroot/.gitignore | 1 - webroot/index.php | 27 +- 123 files changed, 2340 insertions(+), 1400 deletions(-) delete mode 100644 .htaccess create mode 100644 VERSION.txt delete mode 100644 app/.htaccess delete mode 100644 app/Config/Compile.php delete mode 100644 app/Config/Console.php create mode 100644 app/Config/Packages.php delete mode 100644 app/Config/Plugins.php create mode 100644 app/Config/Profiler.php create mode 100644 app/Config/ReCaptcha.php create mode 100644 app/Config/Routing.php delete mode 100644 app/Config/Services.php create mode 100644 app/Console/Bootstrap.php delete mode 100644 app/Console/Kernel.php create mode 100644 app/Database/Migrations/2017_09_15_074021_create_users_table.php rename app/Database/Migrations/{2017_05_26_205537_create_session_table.php => 2017_09_15_091222_create_session_table.php} (99%) rename app/Database/Migrations/{2017_05_26_205445_create_cache_table.php => 2017_09_15_092106_create_cache_table.php} (99%) create mode 100644 app/Database/Migrations/2018_02_21_150531_create_failed_jobs_table.php create mode 100644 app/Database/Migrations/2018_02_21_150533_create_jobs_table.php create mode 100644 app/Database/Seeds/UsersTableSeeder.php create mode 100644 app/Events.php delete mode 100644 app/Events/Event.php delete mode 100644 app/Http/Kernel.php delete mode 100644 app/Http/Requests/Request.php delete mode 100644 app/Jobs/Job.php create mode 100644 app/Language/CZ/messages.php delete mode 100644 app/Language/HU/messages.php rename app/{Http => }/Middleware/EncryptCookies.php (90%) create mode 100644 app/Middleware/HandleProfiling.php create mode 100644 app/Middleware/MarkNotificationAsRead.php rename app/{Http => }/Middleware/RedirectIfAuthenticated.php (97%) rename app/{Http => }/Middleware/VerifyCsrfToken.php (90%) create mode 100644 app/Models/User.php rename app/{ => Platform}/Exceptions/Handler.php (97%) create mode 100644 app/Platform/Start.php delete mode 100644 app/Policies/.gitkeep delete mode 100644 app/Routes/Console.php delete mode 100644 app/Start.php delete mode 100644 app/Views/Default.php create mode 100644 app/Views/Default.tpl create mode 100644 app/Views/Emails/Notifications/Default.tpl create mode 100644 app/Views/Emails/Notifications/Plain.tpl delete mode 100644 app/Views/Layouts/Default.php create mode 100644 app/Views/Layouts/Default.tpl delete mode 100644 app/Views/Layouts/Static.php create mode 100644 app/Views/Layouts/Static.tpl delete mode 100644 app/Views/Partials/Messages.php create mode 100644 app/Views/Partials/Messages.tpl create mode 100644 app/Views/Static.tpl create mode 100644 assets/css/bootstrap-xl-mod.css create mode 100644 assets/css/bootstrap-xl-mod.min.css delete mode 100644 assets/images/users/no-image.png rename {app/Listeners => modules}/.gitkeep (100%) delete mode 100644 plugins/.htaccess delete mode 100644 scripts/.htaccess create mode 100644 shared/Language/CS/messages.php create mode 100644 shared/Language/DA/messages.php create mode 100644 shared/Language/DE/messages.php create mode 100644 shared/Language/EN/messages.php create mode 100644 shared/Language/ES/messages.php create mode 100644 shared/Language/FA/messages.php create mode 100644 shared/Language/FR/messages.php create mode 100644 shared/Language/IT/messages.php create mode 100644 shared/Language/JA/messages.php create mode 100644 shared/Language/NL/messages.php create mode 100644 shared/Language/PL/messages.php create mode 100644 shared/Language/RO/messages.php create mode 100644 shared/Language/RU/messages.php create mode 100644 shared/Support/helpers.php delete mode 100644 storage/.htaccess delete mode 100644 storage/files/quarantine/.gitignore delete mode 100644 storage/files/thumbnails/.gitignore rename {app/Models => themes}/.gitkeep (100%) rename scripts/makelangs.php => update.php (68%) delete mode 100644 webroot/.gitignore diff --git a/.gitignore b/.gitignore index c76f48f9..3e43c6b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea +.vscode # Framework specific vendor/ composer.lock diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 5a928f6d..00000000 --- a/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Options -Indexes diff --git a/README.md b/README.md index 77c53f1e..3cb6b989 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -![Nova Framework](https://novaframework.com/themes/nova/assets/images/nova.png) +![Nova Framework](http://novaframework.com/app/templates/publicthemes/nova/images/nova.png) -# Nova Framework 4.0 +# Nova Framework [![Total Downloads](https://img.shields.io/packagist/dt/nova-framework/framework.svg)](https://packagist.org/packages/nova-framework/framework) [![Dependency Status](https://www.versioneye.com/user/projects/554367f738331321e2000005/badge.svg)](https://www.versioneye.com/user/projects/554367f738331321e2000005) @@ -8,7 +8,7 @@ [![GitHub stars](https://img.shields.io/github/stars/nova-framework/framework.svg)](https://github.com/nova-framework/framework/stargazers) [![GitHub forks](https://img.shields.io/github/forks/nova-framework/framework.svg)](https://github.com/nova-framework/framework/network) -[![Join the chat at https://gitter.im/nova-framework/framework](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/nova-framework/framework?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Join the general chat open to all at https://gitter.im/nova-framework/framework](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/nova-framework/framework/novausers) - [What is the Nova Framework?](#what-is-the-nova-framework) - [Requirements](#requirements) @@ -24,7 +24,7 @@ ## What is the Nova Framework? -Nova Framework is a PHP 5.5 MVC system. It's designed to be lightweight and modular, allowing developers to build better and easy to maintain code with PHP. +Nova Framework is a PHP 5.6 MVC system. It's designed to be lightweight and modular, allowing developers to build better and easy to maintain code with PHP. The base framework comes with a range of [helper classes](https://github.com/nova-framework/framework/tree/master/system/Helpers). @@ -32,7 +32,7 @@ The base framework comes with a range of [helper classes](https://github.com/nov **The framework requirements are limited.** -- PHP 5.5 or greater. +- PHP 5.6 or greater. - Apache Web Server or equivalent with mod rewrite support. - IIS with URL Rewrite module installed - [http://www.iis.net/downloads/microsoft/url-rewrite](http://www.iis.net/downloads/microsoft/url-rewrite) @@ -41,6 +41,7 @@ The base framework comes with a range of [helper classes](https://github.com/nov - Fileinfo (edit php.ini and uncomment php_fileinfo.dll or use php selector within cpanel if available.) - OpenSSL - INTL +- MBString > **Note:** Although a database is not required, if a database is to be used, the system is designed to work with a MySQL database using PDO. @@ -48,39 +49,30 @@ The base framework comes with a range of [helper classes](https://github.com/nov This framework was designed and is **strongly recommended** to be installed above the document root directory, with it pointing to the `public` folder. -Additionally, installing in a sub-directory, on a production server, will introduce severe security issues. +Additionally, installing in a sub-directory, on a production server, will introduce severe security issues. If there is no choice still place the framework files above the document root and have only index.php and .htacess from the public folder in the sub folder and adjust the paths accordingly. #### Recommended -The framework is located on [Packagist](https://packagist.org/packages/nova-framework/app). +The framework is located on [Packagist](https://packagist.org/packages/nova-framework/framework). You can install the framework from a terminal by using: ``` -composer create-project nova-framework/app foldername -s dev +composer create-project nova-framework/framework foldername 3.* -s dev ``` The foldername is the desired folder to be created. - -> **Note:** You can install the full application variant from a terminal by using: +> **Note:** You can install the bare application variant from a terminal by using: ``` -composer create-project nova-framework/framework foldername -s dev +composer create-project nova-framework/app foldername 3.* -s dev ``` -#### Manual - -- Place the contents of `public` into your public folder (`.htaccess` and `index.php`) -- Navigate to your project in a terminal and type `composer install` to initiate the composer installation. -- Edit `public/.htaccess` to set the rewritebase if running on a sub folder, otherwise a single `/` will do. -- Edit `app/Config.example.php` and change the `SITEURL` and `DIR` constants. The `DIR` path is relative to the project url for example `/` for on the root or `/foldername/` when in a folder. Also change other options as desired. Rename file to `Config.php` -- Set a 32 character `ENCRYPT_KEY` by using the CLI tool. You can do this by typing `php nova make:key` in your command line / console. Alternatively, you can use the following tool: http://jeffreybarke.net/tools/codeigniter-encryption-key-generator/ - -> **Note:** For additional installation instructions, for example; setting up a Virtualhost (Recommended for Local Development), Nginx or IIS with URL Rewrite, [please visit the Github Wiki](https://github.com/nova-framework/framework/wiki/Install). +> **Note:** For additional installation instructions, for example; setting up a Virtualhost (Recommended for Local Development), Nginx or IIS with URL Rewrite, [please visit the install docs](http://novaframework.com/documentation/v3/install). ## Documentation -Full docs & tutorials are available on [novaframework.com](http://novaframework.com) and the [Github Wiki](https://github.com/nova-framework/framework/wiki). +Full docs & tutorials are available on [novaframework.com](http://novaframework.com/documentation/v3). Offline docs are available in PDF, EPUB and MOBI formats on [Leanpub](https://leanpub.com/novaframeworkmanual22). diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 00000000..fcdb2e10 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +4.0.0 diff --git a/app/.htaccess b/app/.htaccess deleted file mode 100644 index 14249c50..00000000 --- a/app/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/app/Bootstrap.php b/app/Bootstrap.php index a4abe2da..35bce1ba 100644 --- a/app/Bootstrap.php +++ b/app/Bootstrap.php @@ -1,2 +1,5 @@ true, - - /* - |-------------------------------------------------------------------------- - | Base Site URL - |-------------------------------------------------------------------------- - | - | URL to your Nova root. Typically this will be your base URL, - | WITH a trailing slash: - | - | http://example.com/ - | - | WARNING: You MUST set this value! - | - */ - + /** + * Debug Mode + */ + 'debug' => true, // When enabled the actual PHP errors will be shown. + + /** + * The Website URL. + */ 'url' => 'http://www.novaframework.dev/', - /* - |-------------------------------------------------------------------------- - | The Administrator's E-mail Address - |-------------------------------------------------------------------------- - | - | The e-mail address for your application's administrator. - | + /** + * The Administrator's E-mail Address. */ - 'email' => 'admin@novaframework.dev', - /* - |-------------------------------------------------------------------------- - | The Website Path - |-------------------------------------------------------------------------- - | - */ - + /** + * The Website Path. + */ 'path' => '/', - /* - |-------------------------------------------------------------------------- - | Application Name - |-------------------------------------------------------------------------- - | - | This value is the name of your application. This value is used when the - | framework needs to place the application's name in a notification or - | any other location as required by the application. - | - */ - - 'name' => 'Nova 4.0 - Bare Application', - - /* - |-------------------------------------------------------------------------- - | Default Theme - |-------------------------------------------------------------------------- - | - | Used for the applications default theme. - | - */ + /** + * Website Name. + */ + 'name' => 'Nova 3.0', + /** + * The default Theme. + */ 'theme' => 'Bootstrap', - /* - |-------------------------------------------------------------------------- - | Application Backend Colour Scheme - |-------------------------------------------------------------------------- - | - | Used for the applications Backend AdminLTE template. - | - | Options: - | - blue - | - blue-light - | - black - | - black-light - | - purple - | - purple-light - | - yellow - | - yellow-light - | - red - | - red-light - | - green - | - green-light - | - */ - + /** + * The Backend's Color Scheme. + */ 'color_scheme' => 'blue', - /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | - */ - + /** + * The default locale that will be used by the translation. + */ 'locale' => 'en', - /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. - | - | http://www.php.net/manual/en/timezones.php - | - */ - + /** + * The default Timezone for your website. + * http://www.php.net/manual/en/timezones.php + */ 'timezone' => 'Europe/London', - /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is used by the encrypter service and should be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! - | - | This page can be used to generate key - http://novaframework.com/token-generator - | - */ - + /** + * The Encryption Key. + * This page can be used to generate key - http://novaframework.com/token-generator + */ 'key' => 'SomeRandomStringThere_1234567890', /* @@ -163,99 +74,99 @@ | */ - 'log' => 'single', + 'log' => 'daily', - /* - |-------------------------------------------------------------------------- - | Cross Site Request Forgery (CSRF) - |-------------------------------------------------------------------------- - | - | Enables a CSRF cookie token to be set. When set to TRUE, token will be - | checked on a submitted form. If you are accepting user data, it is strongly - | recommended CSRF protection be enabled. - | - */ + /** + * The Application's Middleware stack. + */ + 'middleware' => array( + 'Nova\Foundation\Http\Middleware\CheckForMaintenanceMode', + 'Nova\Routing\Middleware\DispatchAssetFiles', + ), - 'csrf' => true, + /** + * The Application's route Middleware Groups. + */ + 'middlewareGroups' => array( + 'web' => array( + 'App\Middleware\HandleProfiling', + 'App\Middleware\EncryptCookies', + 'Nova\Cookie\Middleware\AddQueuedCookiesToResponse', + 'Nova\Session\Middleware\StartSession', + 'Nova\Foundation\Http\Middleware\SetupLanguage', + 'Nova\View\Middleware\ShareErrorsFromSession', + 'App\Middleware\VerifyCsrfToken', + //'App\Middleware\MarkNotificationAsRead', + ), + 'api' => array( + 'throttle:60,1', + ) + ), - /* - |-------------------------------------------------------------------------- - | Autoloaded Service Providers - |-------------------------------------------------------------------------- - | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. - | - */ + /** + * The Application's route Middleware. + */ + 'routeMiddleware' => array( + 'auth' => 'Nova\Auth\Middleware\Authenticate', + 'guest' => 'App\Middleware\RedirectIfAuthenticated', + 'throttle' => 'Nova\Routing\Middleware\ThrottleRequests', + ), + /** + * The registered Service Providers. + */ 'providers' => array( - // The Framework Providers. - 'Nova\Plugins\PluginServiceProvider', 'Nova\Auth\AuthServiceProvider', 'Nova\Bus\BusServiceProvider', 'Nova\Cache\CacheServiceProvider', + 'Nova\Routing\RoutingServiceProvider', 'Nova\Cookie\CookieServiceProvider', + 'Nova\Package\PackageServiceProvider', 'Nova\Database\DatabaseServiceProvider', 'Nova\Encryption\EncryptionServiceProvider', 'Nova\Filesystem\FilesystemServiceProvider', - 'Nova\Foundation\Providers\FoundationServiceProvider', 'Nova\Hashing\HashServiceProvider', - 'Nova\Language\LanguageServiceProvider', 'Nova\Mail\MailServiceProvider', 'Nova\Pagination\PaginationServiceProvider', 'Nova\Queue\QueueServiceProvider', 'Nova\Redis\RedisServiceProvider', 'Nova\Session\SessionServiceProvider', + 'Nova\Language\LanguageServiceProvider', 'Nova\Validation\ValidationServiceProvider', 'Nova\View\ViewServiceProvider', 'Nova\Broadcasting\BroadcastServiceProvider', + 'Nova\Notification\NotificationServiceProvider', - // The Forge/Console Providers. - 'Nova\Foundation\Providers\ForgeServiceProvider', - 'Nova\Foundation\Providers\ConsoleSupportServiceProvider', + // The Forge Providers. 'Nova\Cache\ConsoleServiceProvider', + 'Nova\Foundation\Providers\ConsoleSupportServiceProvider', + 'Nova\Foundation\Providers\ForgeServiceProvider', 'Nova\Database\MigrationServiceProvider', 'Nova\Database\SeedServiceProvider', - 'Nova\Plugins\ConsoleServiceProvider', + 'Nova\Package\ConsoleServiceProvider', 'Nova\Routing\ConsoleServiceProvider', 'Nova\Session\ConsoleServiceProvider', // The Application Providers. 'App\Providers\AppServiceProvider', 'App\Providers\AuthServiceProvider', - //'App\Providers\BroadcastServiceProvider', 'App\Providers\EventServiceProvider', 'App\Providers\RouteServiceProvider', + 'App\Providers\BroadcastServiceProvider', ), - /* - |-------------------------------------------------------------------------- - | Service Provider Manifest - |-------------------------------------------------------------------------- - | - | The service provider manifest is used by Nova to lazy load service - | providers which are not needed for each request, as well to keep a - | list of all of the services. Here, you may set its storage spot. - | - */ - - 'manifest' => STORAGE_PATH, - - /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. - | - */ + /** + * The Service Providers Manifest path. + */ + 'manifest' => BASEPATH .'storage', + /** + * The registered Class Aliases. + */ 'aliases' => array( // The Support Classes. 'Arr' => 'Nova\Support\Arr', + 'Assets' => 'Nova\Support\Assets', 'Str' => 'Nova\Support\Str', // The Database Seeder. @@ -263,7 +174,6 @@ // The Support Facades. 'App' => 'Nova\Support\Facades\App', - 'Forge' => 'Nova\Support\Facades\Forge', 'Auth' => 'Nova\Support\Facades\Auth', 'Broadcast' => 'Nova\Support\Facades\Broadcast', 'Bus' => 'Nova\Support\Facades\Bus', @@ -274,11 +184,13 @@ 'DB' => 'Nova\Support\Facades\DB', 'Event' => 'Nova\Support\Facades\Event', 'File' => 'Nova\Support\Facades\File', + 'Forge' => 'Nova\Support\Facades\Forge', 'Gate' => 'Nova\Support\Facades\Gate', 'Hash' => 'Nova\Support\Facades\Hash', 'Input' => 'Nova\Support\Facades\Input', 'Language' => 'Nova\Support\Facades\Language', - 'Mail' => 'Nova\Support\Facades\Mail', + 'Mailer' => 'Nova\Support\Facades\Mailer', + 'Notification' => 'Nova\Support\Facades\Notification', 'Paginator' => 'Nova\Support\Facades\Paginator', 'Queue' => 'Nova\Support\Facades\Queue', 'Redirect' => 'Nova\Support\Facades\Redirect', @@ -286,16 +198,15 @@ 'Request' => 'Nova\Support\Facades\Request', 'Response' => 'Nova\Support\Facades\Response', 'Route' => 'Nova\Support\Facades\Route', + 'Schedule' => 'Nova\Support\Facades\Schedule', 'Schema' => 'Nova\Support\Facades\Schema', - 'Section' => 'Nova\Support\Facades\Section', 'Session' => 'Nova\Support\Facades\Session', 'Validator' => 'Nova\Support\Facades\Validator', 'Log' => 'Nova\Support\Facades\Log', 'URL' => 'Nova\Support\Facades\URL', - 'View' => 'Nova\Support\Facades\View', - 'Widget' => 'Nova\Support\Facades\Widget', 'Template' => 'Nova\Support\Facades\Template', - 'Plugin' => 'Nova\Support\Facades\Plugin', + 'View' => 'Nova\Support\Facades\View', + 'Package' => 'Nova\Support\Facades\Package', ), ); diff --git a/app/Config/Auth.php b/app/Config/Auth.php index 5be2d505..28c8673a 100644 --- a/app/Config/Auth.php +++ b/app/Config/Auth.php @@ -3,22 +3,26 @@ * Auth configuration * * @author Virgil-Adrian Teaca - virgil@giulianaeassociati.com - * @version 4.0 + * @version 3.0 */ return array( /* |-------------------------------------------------------------------------- - | Default Authentication Guard + | Authentication Defaults |-------------------------------------------------------------------------- | - | This option controls the default authentication "guard". You may change - | this default as required, but it's a perfect start for most applications. + | This option controls the default authentication "guard" and password + | reset options for your application. You may change these defaults + | as required, but they're a perfect start for most applications. | */ - 'default' => 'web', + 'defaults' => array( + 'guard' => 'web', + 'reminder' => 'users', + ), /* |-------------------------------------------------------------------------- @@ -44,7 +48,7 @@ 'paths' => array( 'authorize' => 'login', - 'dashboard' => 'admin/dashboard', + 'dashboard' => 'dashboard', ), ), 'api' => array( @@ -73,8 +77,35 @@ 'providers' => array( 'users' => array( 'driver' => 'extended', - 'model' => 'Backend\Models\User', + 'model' => 'App\Models\User', ), ), + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | Here you may set the options for resetting passwords including the view + | that is your password reset e-mail. You may also set the name of the + | table that maintains all of the reset tokens for your application. + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expire time is the number of minutes that the reset token should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + */ + + 'reminders' => array( + 'users' => array( + 'provider' => 'users', + 'email' => 'Emails/Auth/Reminder', + 'table' => 'password_reminders', + 'expire' => 60, + ), + ), ); diff --git a/app/Config/Broadcasting.php b/app/Config/Broadcasting.php index ae1d7d97..4bb16c0b 100644 --- a/app/Config/Broadcasting.php +++ b/app/Config/Broadcasting.php @@ -11,11 +11,9 @@ | framework when an event needs to be broadcast. You may set this to | any of the connections defined in the "connections" array below. | - | Supported: "pusher", "redis", "log", "null" - | */ - 'default' => env('BROADCAST_DRIVER', 'null'), + 'default' => env('BROADCAST_DRIVER', 'log'), /* |-------------------------------------------------------------------------- @@ -52,7 +50,6 @@ 'null' => array( 'driver' => 'null', ), - ), ); diff --git a/app/Config/Cache.php b/app/Config/Cache.php index 2041751c..a8874e17 100644 --- a/app/Config/Cache.php +++ b/app/Config/Cache.php @@ -3,11 +3,11 @@ * Cache configuration * * @author Virgil-Adrian Teaca - virgil@giulianaeassociati.com + * @version 3.0 */ return array( - /* |-------------------------------------------------------------------------- | Default Cache Driver @@ -17,7 +17,7 @@ | using the Caching library. Of course, you may use other drivers any | time you wish. This is the default when another is not specified. | - | Supported: "file", "database", "array" + | Supported: "file", "database", "apc", "memcached", "redis", "array" */ 'driver' => 'file', @@ -30,10 +30,9 @@ | When using the "file" cache driver, we need a location where the cache | files may be stored. A sensible default has been specified, but you | are free to change it to any other place on disk that you desire. - | */ - 'path' => STORAGE_PATH . 'cache', + 'path' => STORAGE_PATH .'cache', /* |-------------------------------------------------------------------------- @@ -43,7 +42,6 @@ | When using the "database" cache driver you may specify the connection | that should be used to store the cached items. When this option is | null the default database connection will be utilized for cache. - | */ 'connection' => null, @@ -56,11 +54,24 @@ | When using the "database" cache driver we need to know the table that | should be used to store the cached items. A default table name has | been provided but you're free to change it however you deem fit. - | */ 'table' => 'cache', + /* + |-------------------------------------------------------------------------- + | Memcached Servers + |-------------------------------------------------------------------------- + | + | Now you may specify an array of your Memcached servers that should be + | used when utilizing the Memcached cache driver. All of the servers + | should contain a value for "host", "port", and "weight" options. + */ + + 'memcached' => array( + array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100), + ), + /* |-------------------------------------------------------------------------- | Cache Key Prefix @@ -71,6 +82,6 @@ | value to get prefixed to all our keys so we can avoid collisions. */ - 'prefix' => 'mini', + 'prefix' => 'nova', ); diff --git a/app/Config/Compile.php b/app/Config/Compile.php deleted file mode 100644 index b4bbc8ee..00000000 --- a/app/Config/Compile.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'Nova\Foundation\Providers\ForgeServiceProvider', - 'Nova\Foundation\Providers\ConsoleSupportServiceProvider', - 'Nova\Auth\Reminders\ConsoleServiceProvider', - 'Nova\Cache\ConsoleServiceProvider', - 'Nova\Database\MigrationServiceProvider', - 'Nova\Database\SeedServiceProvider', - 'Nova\Log\ConsoleServiceProvider', - 'Nova\Plugins\ConsoleServiceProvider', - 'Nova\Routing\Providers\ConsoleServiceProvider', - 'Nova\Session\ConsoleServiceProvider', - ), -); diff --git a/app/Config/Database.php b/app/Config/Database.php index b6ccfc8d..860492f5 100644 --- a/app/Config/Database.php +++ b/app/Config/Database.php @@ -1,65 +1,30 @@ PDO::FETCH_CLASS, - /* - |-------------------------------------------------------------------------- - | Default Database Connection Name - |-------------------------------------------------------------------------- - | - | Here you may specify which of the database connections below you wish - | to use as your default connection for all database work. Of course - | you may use many connections at once using the Database library. - | - */ - + // The Default Database Connection Name. 'default' => 'mysql', - /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Nova is shown below to make development simple. - | - | - | All database work in Nova is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. - | - */ - + // The Database Connections. 'connections' => array( 'sqlite' => array( 'driver' => 'sqlite', - 'database' => APPPATH .'Storage' .DS .'database.sqlite', + 'database' => BASEPATH .'storage' .DS .'database.sqlite', 'prefix' => '', ), 'mysql' => array( 'driver' => 'mysql', - 'host' => 'localhost', + 'hostname' => 'localhost', 'database' => 'nova', 'username' => 'nova', 'password' => 'password', @@ -79,47 +44,10 @@ ), ), - /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | - */ - + // Migration Repository Table 'migrations' => 'migrations', - /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer set of commands than a typical key-value systems - | such as APC or Memcached. Nova makes it easy to dig right in. - | - */ - - 'redis' => array( - 'cluster' => false, - - 'default' => array( - 'host' => '127.0.0.1', - 'port' => 6379, - 'database' => 0, - ), - ), - - /* - |-------------------------------------------------------------------------- - | Database Backup - |-------------------------------------------------------------------------- - | - */ - + // Database Backup 'backup' => array( // The path where database dumps are stored. 'path' => APPPATH .'Database' .DS .'Backup', @@ -130,7 +58,7 @@ 'restoreCommandPath' => '/usr/bin/mysql', ), - // Wheter or not the dump file is compressed. + // Whether or not the dump file is compressed. 'compress' => true, ), ); diff --git a/app/Config/Languages.php b/app/Config/Languages.php index b20ac688..30d6d3a6 100644 --- a/app/Config/Languages.php +++ b/app/Config/Languages.php @@ -1,26 +1,25 @@ array('info' => 'Czech', 'name' => 'čeština', 'locale' => 'cs_CZ', 'dir' => 'ltr', 'flag' => 'cz'), - 'da' => array('info' => 'Danish', 'name' => 'Dansk', 'locale' => 'da_DK', 'dir' => 'ltr', 'flag' => 'dk'), - 'de' => array('info' => 'German', 'name' => 'Deutsch', 'locale' => 'de_DE', 'dir' => 'ltr', 'flag' => 'de'), - 'en' => array('info' => 'English', 'name' => 'English', 'locale' => 'en_US', 'dir' => 'ltr', 'flag' => 'gb'), - 'es' => array('info' => 'Spanish', 'name' => 'Español', 'locale' => 'es_ES', 'dir' => 'ltr', 'flag' => 'es'), - 'fa' => array('info' => 'Persian', 'name' => 'پارسی', 'locale' => 'fa_IR', 'dir' => 'rtl', 'flag' => 'ir'), - 'fr' => array('info' => 'French', 'name' => 'Français', 'locale' => 'fr_FR', 'dir' => 'ltr', 'flag' => 'fr'), - 'hu' => array('info' => 'Hungarian', 'name' => 'magyar', 'locale' => 'hu_HU', 'dir' => 'ltr', 'flag' => 'hu'), - 'it' => array('info' => 'Italian', 'name' => 'italiano', 'locale' => 'it_IT', 'dir' => 'ltr', 'flag' => 'it'), - 'ja' => array('info' => 'Japanesse', 'name' => '日本語', 'locale' => 'ja_JA', 'dir' => 'ltr', 'flag' => 'jp'), - 'nl' => array('info' => 'Dutch', 'name' => 'Nederlands', 'locale' => 'nl_NL', 'dir' => 'ltr', 'flag' => 'nl'), - 'pl' => array('info' => 'Polish', 'name' => 'polski', 'locale' => 'pl_PL', 'dir' => 'ltr', 'flag' => 'pl'), - 'ro' => array('info' => 'Romanian', 'name' => 'Română', 'locale' => 'ro_RO', 'dir' => 'ltr', 'flag' => 'ro'), - 'ru' => array('info' => 'Russian', 'name' => 'ру́сский', 'locale' => 'ru_RU', 'dir' => 'ltr', 'flag' => 'ru'), + 'cs' => array('info' => 'Czech', 'name' => 'čeština', 'locale' => 'cs_CZ', 'dir' => 'ltr'), + 'da' => array('info' => 'Danish', 'name' => 'Dansk', 'locale' => 'da_DK', 'dir' => 'ltr'), + 'de' => array('info' => 'German', 'name' => 'Deutsch', 'locale' => 'de_DE', 'dir' => 'ltr'), + 'en' => array('info' => 'English', 'name' => 'English', 'locale' => 'en_US', 'dir' => 'ltr'), + 'es' => array('info' => 'Spanish', 'name' => 'Español', 'locale' => 'es_ES', 'dir' => 'ltr'), + 'fa' => array('info' => 'Persian', 'name' => 'پارسی', 'locale' => 'fa_IR', 'dir' => 'rtl'), + 'fr' => array('info' => 'French', 'name' => 'Français', 'locale' => 'fr_FR', 'dir' => 'ltr'), + 'it' => array('info' => 'Italian', 'name' => 'italiano', 'locale' => 'it_IT', 'dir' => 'ltr'), + 'ja' => array('info' => 'Japanesse', 'name' => '日本語', 'locale' => 'ja_JA', 'dir' => 'ltr'), + 'nl' => array('info' => 'Dutch', 'name' => 'Nederlands', 'locale' => 'nl_NL', 'dir' => 'ltr'), + 'pl' => array('info' => 'Polish', 'name' => 'polski', 'locale' => 'pl_PL', 'dir' => 'ltr'), + 'ro' => array('info' => 'Romanian', 'name' => 'Română', 'locale' => 'ro_RO', 'dir' => 'ltr'), + 'ru' => array('info' => 'Russian', 'name' => 'ру́сский', 'locale' => 'ru_RU', 'dir' => 'ltr'), ); diff --git a/app/Config/Mail.php b/app/Config/Mail.php index 7ecc7176..9bbf9a08 100644 --- a/app/Config/Mail.php +++ b/app/Config/Mail.php @@ -1,13 +1,13 @@ 'smtp', - /* - |-------------------------------------------------------------------------- - | Spool Configuration - |-------------------------------------------------------------------------- - | - | When using the mailer's spool, we need a location where spool message - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for spool driver. - | - */ - - 'spool' => array( - 'files' => storage_path('spool'), // Where the spool queue files are stored. - - 'messageLimit' => 10, // The maximum number of messages to send per flush. - 'timeLimit' => 100, // The time limit (in seconds) per flush. - 'retryLimit' => 10, // Allow to manage the enqueuing retry limit. - 'recoveryTimeout' => 900, // in seconds - defaults is for very slow smtp responses. - ), - /* |-------------------------------------------------------------------------- | SMTP Host Address @@ -81,8 +61,8 @@ */ 'from' => array( - 'address' => 'admin@novaframework.dev', - 'name' => 'The Nova Staff', + 'address' => 'admin@novaframework.dev', + 'name' => 'The Nova Staff', ), /* @@ -149,4 +129,32 @@ */ 'pretend' => true, + + /* + |-------------------------------------------------------------------------- + | Spool Configuration + |-------------------------------------------------------------------------- + | + | When using the mailer's spool, we need a location where spool message + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for spool driver. + | + */ + + 'spool' => array( + 'driver' => 'file', // The driver used for queuing; supported: 'file' or 'database'. + + // Common options: + 'messageLimit' => 10, // The maximum number of messages to send per flush. + 'timeLimit' => 100, // The time limit (in seconds) per flush. + 'retryLimit' => 10, // Allow to manage the enqueuing retry limit. + 'recoveryTimeout' => 900, // in seconds - defaults is for very slow smtp responses. + + // For the File Spool: + 'files' => STORAGE_PATH .'emails', // Where the spool queue files are stored. + + // For the Database Spool: + 'table' => 'spool', // The database Table hosting the Mailer Spool data. + 'connection' => null, // The Database Connection name used by driver. + ), ); diff --git a/app/Config/Packages.php b/app/Config/Packages.php new file mode 100644 index 00000000..07b25efe --- /dev/null +++ b/app/Config/Packages.php @@ -0,0 +1,110 @@ + array( + 'name' => 'John Doe', + 'email' => 'john.doe@novaframework.dev', + 'homepage' => 'http://novaframework.dev', + ), + + //-------------------------------------------------------------------------- + // Path To The Cache File + //-------------------------------------------------------------------------- + + 'cache' => STORAGE_PATH .'packages.php', + + /* + |--------------------------------------------------------------------------- + | Modules Configuration + |--------------------------------------------------------------------------- + | + |*/ + + 'modules' => array( + + //---------------------------------------------------------------------- + // Path to Modules + //---------------------------------------------------------------------- + + 'path' => BASEPATH .'modules', + + //---------------------------------------------------------------------- + // Modules Base Namespace + //---------------------------------------------------------------------- + + 'namespace' => 'Modules\\', + ), + + /* + |-------------------------------------------------------------------------- + | Themes Configuration + |-------------------------------------------------------------------------- + | + */ + + 'themes' => array( + + //---------------------------------------------------------------------- + // Path to Modules + //---------------------------------------------------------------------- + + 'path' => BASEPATH .'themes', + + //---------------------------------------------------------------------- + // Themes Base Namespace + //---------------------------------------------------------------------- + + 'namespace' => 'Themes\\', + ), + + /* + |--------------------------------------------------------------------------- + | Loading Options For The Installed Packages + |--------------------------------------------------------------------------- + | + */ + + 'options' => array( + 'platform' => array( + 'enabled' => true, + 'order' => 7001, + ), + 'fields' => array( + 'enabled' => true, + 'order' => 7002, + ), + 'permissions' => array( + 'enabled' => true, + 'order' => 8001, + ), + 'roles' => array( + 'enabled' => true, + 'order' => 8002, + ), + 'users' => array( + 'enabled' => true, + 'order' => 8003, + ), + 'content' => array( + 'enabled' => true, + 'order' => 8004, + ), + 'chat' => array( + 'enabled' => true, + 'order' => 9001, + ), + 'messages' => array( + 'enabled' => true, + 'order' => 9001, + ), + ), + +); diff --git a/app/Config/Plugins.php b/app/Config/Plugins.php deleted file mode 100644 index 7c63e78c..00000000 --- a/app/Config/Plugins.php +++ /dev/null @@ -1,50 +0,0 @@ - array( - 'name' => 'John Doe', - 'email' => 'john.doe@novaframework.dev', - 'homepage' => 'http://novaframework.dev', - ), - - /* - |-------------------------------------------------------------------------- - | Loading Options For The Installed Plugins - |-------------------------------------------------------------------------- - | - */ - - 'options' => array( - 'file_field' => array( - 'order' => 8001, - 'enabled' => true, - ), - 'widgets' => array( - 'order' => 8001, - 'enabled' => true, - ), - /* - 'bootstrap' => array( - 'order' => 9001, - 'enabled' => true, - ), - /* - 'backend' => array( - 'order' => 9001, - 'enabled' => true, - ), - 'content' => array( - 'order' => 9001, - 'enabled' => true, - ), - */ - ), -); diff --git a/app/Config/Profiler.php b/app/Config/Profiler.php new file mode 100644 index 00000000..928e7f9c --- /dev/null +++ b/app/Config/Profiler.php @@ -0,0 +1,13 @@ + false, + 'withDatabase' => false, +); diff --git a/app/Config/Queue.php b/app/Config/Queue.php index c4008409..5282ffe3 100644 --- a/app/Config/Queue.php +++ b/app/Config/Queue.php @@ -17,7 +17,7 @@ | API, giving you convenient access to each back-end using the same | syntax for each one. Here you may set the default queue driver. | - | Supported: "sync", "database", "beanstalkd", "sqs", "iron", "redis", "async" + | Supported: "sync", "database", "beanstalkd", "sqs", "iron", "redis" | */ @@ -69,14 +69,6 @@ 'driver' => 'redis', 'queue' => 'default', ), - - // NOTE: ONLY FOR RUNNING INCIDENTAL TASKS IN THE BACKGROUND! - 'async' => array( - 'driver' => 'async', - 'table' => 'jobs', - 'queue' => 'default', - 'expire' => 60, - ), ), /* diff --git a/app/Config/ReCaptcha.php b/app/Config/ReCaptcha.php new file mode 100644 index 00000000..8315d028 --- /dev/null +++ b/app/Config/ReCaptcha.php @@ -0,0 +1,14 @@ + false, + 'siteKey' => '', + 'secret' => '', +); diff --git a/app/Config/Routing.php b/app/Config/Routing.php new file mode 100644 index 00000000..296da96a --- /dev/null +++ b/app/Config/Routing.php @@ -0,0 +1,41 @@ + array( + // The browser Cache Control options. + 'cache' => array( + 'ttl' => 600, + 'maxAge' => 10800, + 'sharedMaxAge' => 600, + ), + + // The Valid Vendor Paths - be aware that improper configuration of the Valid Vendor Paths could introduce + // severe security issues, try to limit the access to a precise area, where aren't present "unsafe" files. + // + // '/vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css' + // ^____________________^____^____________________Those are the parts of path which are validated. + // + 'paths' => array( + + // AdminLTE + 'almasaeed2010/adminlte' => array( + 'bower_components', + 'dist', + 'plugins' + ), + + // Bootstrap + 'twbs/bootstrap' => 'dist', + ), + ), +); diff --git a/app/Config/Services.php b/app/Config/Services.php deleted file mode 100644 index 9afe96f9..00000000 --- a/app/Config/Services.php +++ /dev/null @@ -1,22 +0,0 @@ - array( - 'model' => 'User', - 'secret' => '', - ), -); diff --git a/app/Config/Session.php b/app/Config/Session.php index 88143a69..0df44bd5 100644 --- a/app/Config/Session.php +++ b/app/Config/Session.php @@ -3,128 +3,28 @@ * Session Configuration. * * @author Virgil-Adrian Teaca - virgil@giulianaeassociati.com + * @version 3.0 */ return array( + 'driver' => 'file', // The Session Driver used for storing Session data; supported: 'file', 'database' or 'cookie'. - /* - |-------------------------------------------------------------------------- - | Default Session Driver - |-------------------------------------------------------------------------- - | - | This option controls the default session "driver" that will be used on - | requests. By default, we will use the lightweight native driver but - | you may specify any of the other wonderful drivers provided here. - | - | Supported: "file" or "database" - | - */ + // The Database Session Driver configuration. + 'table' => 'sessions', // The Database Table hosting the Session data. + 'connection' => null, // The Database Connection name used by driver. - 'driver' => 'file', + // Session Lifetime. + 'lifetime' => 180, // Number of minutes the Session is allowed to remain idle before it expires. + 'expireOnClose' => false, // If you want them to immediately expire on the browser closing, set that. - /* - |-------------------------------------------------------------------------- - | Session Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the session data and it's connection used - | by the driver. - | - */ + // The File Session Driver configuration. + 'files' => STORAGE_PATH .'sessions', // File Session Handler - where the Session files may be stored. + 'lottery' => array(2, 100), // Option used by the Garbage Collector, to remove the stalled Session files. - 'table' => 'sessions', - 'connection' => null, - - /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to immediately expire on the browser closing, set that option. - | - */ - - 'lifetime' => 180, - 'expireOnClose' => false, - - /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When using the native session driver, we need a location where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | - */ - - 'files' => STORAGE_PATH .'sessions', - - /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | - */ - - 'lottery' => array(2, 100), - - /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | - */ - - 'cookie' => PREFIX .'session', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | - */ - - 'path' => '/', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | - */ - - 'domain' => null, - - /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you if it can not be done securely. - | - */ - - 'secure' => false, + // Cookie configuration. + 'cookie' => PREFIX .'session', + 'path' => '/', + 'domain' => null, + 'secure' => false, ); diff --git a/app/Config/View.php b/app/Config/View.php index b42592c4..d4f419b4 100644 --- a/app/Config/View.php +++ b/app/Config/View.php @@ -3,6 +3,7 @@ * View Configuration. * * @author Virgil-Adrian Teaca - virgil@giulianaeassociati.com + * @version 4.0 */ return array( diff --git a/app/Console/Bootstrap.php b/app/Console/Bootstrap.php new file mode 100644 index 00000000..b1243f4a --- /dev/null +++ b/app/Console/Bootstrap.php @@ -0,0 +1,55 @@ +/dev/null & echo $!', PHP_BINARY, base_path('forge')); + + $pid = exec($command); + + // Store the Queue Worker PID for later checking. + file_put_contents($path, $pid); + } + +})->describe('Monitor the Queue Worker execution'); + + +/** + * Schedule the Queue execution. + */ +//Schedule::command('queue:monitor')->everyMinute(); + +//Schedule::command('queue:work --daemon --tries=3')->everyMinute()->withoutOverlapping()->runInBackground(); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index c1c0c74d..00000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,43 +0,0 @@ -command('auth:clear-reminders')->daily(); - - // Schedule the Database Backup. - $schedule->command('db:backup')->dailyAt('4:30'); - } - - /** - * Register the Closure based commands for the application. - * - * @return void - */ - protected function commands() - { - require app_path('Routes/Console.php'); - } -} diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index 55091c3f..5419964b 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -3,6 +3,7 @@ namespace App\Controllers; use Nova\Foundation\Auth\Access\AuthorizesRequestsTrait; +use Nova\Foundation\Bus\DispatchesJobsTrait; use Nova\Foundation\Validation\ValidatesRequestsTrait; use Nova\Routing\Controller; use Nova\Support\Contracts\RenderableInterface; @@ -17,7 +18,7 @@ class BaseController extends Controller { - use AuthorizesRequestsTrait, ValidatesRequestsTrait; + use DispatchesJobsTrait, AuthorizesRequestsTrait, ValidatesRequestsTrait; /** * The currently called action. @@ -40,13 +41,6 @@ class BaseController extends Controller */ protected $layout = 'Default'; - /** - * True when the auto-rendering is active. - * - * @var bool - */ - protected $autoRender = true; - /** * True when the auto-layouting is active. * @@ -61,13 +55,6 @@ class BaseController extends Controller */ protected $viewPath; - /** - * The View variables. - * - * @var array - */ - protected $viewData = array(); - /** * Method executed before any action. @@ -78,8 +65,16 @@ protected function initialize() { // Setup the used Theme to default, if it is not already defined. if (is_null($this->theme)) { - $this->theme = Config::get('app.theme', 'Bootstrap'); + $this->theme = Config::get('app.theme', 'Themes/Bootstrap'); + } + + if (! Str::contains($theme = $this->theme, '/')) { + $theme = 'Themes/' .$theme; } + + View::overridesFrom($theme); + + Config::set('themes.current', $theme); } /** @@ -109,38 +104,31 @@ public function callAction($method, array $parameters) */ protected function processResponse($response) { - if (! $this->autoRender()) { - return $response; - } - - // The auto-rendering is active. - else if (is_null($response)) { - $response = $this->createView(); - } - if (! $response instanceof RenderableInterface) { return $response; } // The response is a RenderableInterface implementation. else if ($this->autoLayout() && ! empty($this->layout)) { - $view = $this->getLocalizedLayout(); + $view = $this->resolveLayout(); - return View::make($view, $this->viewData)->with('content', $response); + return View::make($view)->with('content', $response); } return $response; } /** - * Gets a localized View name for the implicit Layout. + * Gets a localized View name for the currently used Layout. * * @return string */ - protected function getLocalizedLayout() + protected function resolveLayout() { - if ('rtl' == Language::direction()) { - $layout = sprintf('RTL/%s', $this->layout); + $direction = Language::direction(); + + if ($direction == 'rtl') { + $layout = 'RTL/' .$this->layout; if (View::exists($view = $this->getQualifiedLayout($layout))) { return $view; @@ -160,11 +148,16 @@ protected function getQualifiedLayout($layout = null) { $view = sprintf('Layouts/%s', $layout ?: $this->layout); - if (! empty($theme = $this->getTheme())) { - return sprintf('%s::%s', $theme, $view); + if (empty($theme = $this->getTheme())) { + return $view; + } + + // A theme is specified for auto rendering. + else if (! Str::contains($theme, '/')) { + $theme = 'Themes/' .$theme; } - return $view; + return $theme .'::' .$view; } /** @@ -180,10 +173,9 @@ protected function createView(array $data = array(), $view = null) $view = ucfirst($this->action); } - // Compute the qualified View name. - $view = sprintf('%s/%s', $this->getViewPath(), $view); + $view = $this->resolveViewPath().'/' .$view; - return View::make($view, array_merge($this->viewData, $data)); + return View::make($view, $data); } /** @@ -192,24 +184,21 @@ protected function createView(array $data = array(), $view = null) * @return string * @throws \BadMethodCallException */ - protected function getViewPath() + protected function resolveViewPath() { if (isset($this->viewPath)) { return $this->viewPath; } - $basePath = trim(str_replace('\\', '/', App::getNamespace()), '/'); + $path = str_replace('\\', '/', static::class); - $classPath = str_replace('\\', '/', static::class); + if (preg_match('#^(.+)/Controllers/(.*)$#', $path, $matches) === 1) { + $namespace = $matches[1]; - if (preg_match('#^(.+)/Controllers/(.*)$#', $classPath, $matches) === 1) { $viewPath = $matches[2]; - // - $namespace = $matches[1]; - - if ($namespace !== $basePath) { - // A Controller within a Plugin namespace. + if ($namespace != 'App') { + // A Controller within a Package namespace. $viewPath = $namespace .'::' .$viewPath; } @@ -219,45 +208,6 @@ protected function getViewPath() throw new BadMethodCallException('Invalid controller namespace'); } - /** - * Add a key / value pair to the view data. - * - * Bound data will be available to the view as variables. - * - * @param string|array $one - * @param string|array $two - * @return View - */ - public function set($one, $two = null) - { - if (is_array($one)) { - $data = is_array($two) ? array_combine($one, $two) : $one; - } else { - $data = array($one => $two); - } - - $this->viewData = $data + $this->viewData; - - return $this; - } - - /** - * Turns on or off Nova's conventional mode of auto-rendering. - * - * @param bool|null $enable - * @return bool - */ - public function autoRender($enable = null) - { - if (! is_null($enable)) { - $this->autoRender = (bool) $enable; - - return $this; - } - - return $this->autoRender; - } - /** * Turns on or off Nova's conventional mode of applying layout files. * @@ -282,10 +232,6 @@ public function autoLayout($enable = null) */ public function getTheme() { - if (! isset($this->theme)) { - return $this->theme = Config::get('app.theme', 'Bootstrap'); - } - return $this->theme; } @@ -298,14 +244,4 @@ public function getLayout() { return $this->layout; } - - /** - * Return the current View data. - * - * @return string - */ - public function getViewData() - { - return $this->viewData; - } } diff --git a/app/Controllers/Pages.php b/app/Controllers/Pages.php index 8752f340..5884bd83 100644 --- a/app/Controllers/Pages.php +++ b/app/Controllers/Pages.php @@ -17,7 +17,7 @@ class Pages extends BaseController * * @var string */ - protected $theme = false; // Disable the usage of a Theme. + protected $theme = false; // Disable the support for Themes. /** * The currently used Layout. @@ -27,33 +27,41 @@ class Pages extends BaseController protected $layout = 'Static'; - public function display($slug = null) + public function show($slug = null) { - $path = explode('/', $slug ?: 'home'); + list ($view, $title) = $this->parseSlug($slug, 'pages'); - // Compute the used variables. - $page = $path[0]; + return View::make($view) + ->shares('title', ($title != 'Pages') ? $title : 'Home'); + } - $subpage = isset($path[1]) ? $path[1] : null; + protected function parseSlug($slug, $type) + { + $segments = explode('/', $slug, 2); - $title = Str::title( - str_replace(array('-', '_'), ' ', $subpage ?: $page) - ); + // Compute the page and subpage. + list ($page, $subpage) = array_pad($segments, 2, null); // Compute the full View name, i.e. 'about-us' -> 'Pages/AboutUs' - array_unshift($path, 'pages'); + array_unshift($segments, $type); $view = implode('/', array_map(function ($value) { return Str::studly($value); - }, $path)); + }, $segments)); if (! View::exists($view)) { - throw new NotFoundHttpException($view); + // We will look for the Home view before to go Exception. + if (! View::exists($view = $view .'/Home')) { + throw new NotFoundHttpException($view); + } } - return View::make($view, compact('page', 'subpage')) - ->shares('title', $title); + $title = Str::title( + str_replace(array('-', '_'), ' ', $subpage ?: ($page ?: $type)) + ); + + return array($view, $title); } } diff --git a/app/Database/Migrations/2017_09_15_074021_create_users_table.php b/app/Database/Migrations/2017_09_15_074021_create_users_table.php new file mode 100644 index 00000000..09fadc56 --- /dev/null +++ b/app/Database/Migrations/2017_09_15_074021_create_users_table.php @@ -0,0 +1,39 @@ +increments('id'); + $table->integer('role_id')->unsigned(); + $table->string('username', 100)->unique(); + $table->string('password'); + $table->string('realname'); + $table->string('email', 100)->unique(); + $table->string('remember_token')->nullable(); + $table->string('api_token', 100)->unique()->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users'); + } +} diff --git a/app/Database/Migrations/2017_05_26_205537_create_session_table.php b/app/Database/Migrations/2017_09_15_091222_create_session_table.php similarity index 99% rename from app/Database/Migrations/2017_05_26_205537_create_session_table.php rename to app/Database/Migrations/2017_09_15_091222_create_session_table.php index c3eeb734..f3f6a499 100644 --- a/app/Database/Migrations/2017_05_26_205537_create_session_table.php +++ b/app/Database/Migrations/2017_09_15_091222_create_session_table.php @@ -6,6 +6,7 @@ class CreateSessionTable extends Migration { + /** * Run the migrations. * diff --git a/app/Database/Migrations/2017_05_26_205445_create_cache_table.php b/app/Database/Migrations/2017_09_15_092106_create_cache_table.php similarity index 99% rename from app/Database/Migrations/2017_05_26_205445_create_cache_table.php rename to app/Database/Migrations/2017_09_15_092106_create_cache_table.php index a2bb65dc..76e84189 100644 --- a/app/Database/Migrations/2017_05_26_205445_create_cache_table.php +++ b/app/Database/Migrations/2017_09_15_092106_create_cache_table.php @@ -6,6 +6,7 @@ class CreateCacheTable extends Migration { + /** * Run the migrations. * diff --git a/app/Database/Migrations/2018_02_21_150531_create_failed_jobs_table.php b/app/Database/Migrations/2018_02_21_150531_create_failed_jobs_table.php new file mode 100644 index 00000000..fc1b02cd --- /dev/null +++ b/app/Database/Migrations/2018_02_21_150531_create_failed_jobs_table.php @@ -0,0 +1,37 @@ +increments('id'); + $table->text('connection'); + $table->text('queue'); + $table->text('payload'); + $table->timestamp('failed_at'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('failed_jobs'); + } + +} diff --git a/app/Database/Migrations/2018_02_21_150533_create_jobs_table.php b/app/Database/Migrations/2018_02_21_150533_create_jobs_table.php new file mode 100644 index 00000000..58b5ff2e --- /dev/null +++ b/app/Database/Migrations/2018_02_21_150533_create_jobs_table.php @@ -0,0 +1,37 @@ +bigIncrements('id'); + $table->string('queue')->index(); + $table->longText('payload'); + $table->tinyInteger('attempts')->unsigned(); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('jobs'); + } +} diff --git a/app/Database/Seeds/DatabaseSeeder.php b/app/Database/Seeds/DatabaseSeeder.php index 6894d1b7..3ecb332e 100644 --- a/app/Database/Seeds/DatabaseSeeder.php +++ b/app/Database/Seeds/DatabaseSeeder.php @@ -6,6 +6,7 @@ class DatabaseSeeder extends Seeder { + /** * Run the database seeds. * @@ -16,7 +17,6 @@ public function run() Model::unguard(); // - //$this->call('App\Database\Seeds\FoobarTableSeeder'); + $this->call('App\Database\Seeds\UsersTableSeeder'); } - } diff --git a/app/Database/Seeds/UsersTableSeeder.php b/app/Database/Seeds/UsersTableSeeder.php new file mode 100644 index 00000000..5508c255 --- /dev/null +++ b/app/Database/Seeds/UsersTableSeeder.php @@ -0,0 +1,34 @@ + 1, + 'username' => 'admin', + 'password' => Hash::make('admin'), + 'realname' => 'Site Administrator', + 'email' => 'admin@novaframework.dev', + 'remember_token' => '', + 'api_token' => Str::random(60), + )); + } +} diff --git a/app/Events.php b/app/Events.php new file mode 100644 index 00000000..04844a6a --- /dev/null +++ b/app/Events.php @@ -0,0 +1,48 @@ +path()); +}); + + +// Add a Listener to the Event 'nova.queue.looping', to check the database connection. +Event::listen('nova.queue.looping', function ($connection, $queue) +{ + if ($connection != 'database') { + return; + } + + try { + $count = DB::table('jobs')->count(); + + if ($count == 0) return false; + } + catch (Exception $e) { + return false; + } +}); diff --git a/app/Events/Event.php b/app/Events/Event.php deleted file mode 100644 index a3ec7c77..00000000 --- a/app/Events/Event.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'App\Http\Middleware\EncryptCookies', - 'Nova\Cookie\Middleware\AddQueuedCookiesToResponse', - 'Nova\Session\Middleware\StartSession', - 'Nova\Foundation\Http\Middleware\SetupLanguage', - 'Nova\View\Middleware\ShareErrorsFromSession', - 'App\Http\Middleware\VerifyCsrfToken', - ), - 'api' => array( - 'throttle:60,1', - ) - ); - - /** - * The Application's route Middleware. - * - * @var array - */ - protected $routeMiddleware = array( - 'auth' => 'Nova\Auth\Middleware\Authenticate', - 'guest' => 'App\Http\Middleware\RedirectIfAuthenticated', - 'throttle' => 'Nova\Routing\Middleware\ThrottleRequests', - ); -} diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php deleted file mode 100644 index 64757933..00000000 --- a/app/Http/Requests/Request.php +++ /dev/null @@ -1,11 +0,0 @@ - '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/CZ/messages.php b/app/Language/CZ/messages.php new file mode 100644 index 00000000..28f5c849 --- /dev/null +++ b/app/Language/CZ/messages.php @@ -0,0 +1,35 @@ + 'Špatný požadavek +', + 'Forbidden' => 'Zakázáno', + 'Go to our home page and navigate to the content in question.' => 'Prejdete na domovskou stránku a prejdete na príslušný obsah.', + 'Hello, welcome from the welcome controller and subpage method!
+This content can be changed in /app/Views/Welcome/SubPage.php' => 'Dobrý den, vítá Vás úvodní kontroler a metoda podstránka!
+Tento obsah lze zmenit v /app/Views/Welcome/SubPage.php', + 'Hello, welcome from the welcome controller!
+this content can be changed in /app/Views/Welcome/Welcome.php' => 'Dobrý den, vítá Vás úvodní kontroler!
+Tento obsah lze zmenit v /app/Views/Welcome/Welcome.php', + 'Home' => 'Domu', + 'If you have problems, please paste the above URL into your web browser.' => 'Máte-li problémy, vložte prosím výše uvedený URL do svého webového prohlížece.', + 'If you spelled the URL manually, double check the spelling.' => 'Pokud jste adresu URL napsali rucne, zkontrolujte pravopis', + 'Internal Server Error' => 'Interní chyba serveru', + 'Method not allowed' => 'Metoda není povolena', + 'Open subpage' => 'Otevrít podstránku', + 'Password Reset' => 'Resetovat heslo', + 'Please verify your E-mail address' => 'Overte prosím svou e-mailovou adresu', + 'Referrer: {0}' => 'Referrer: {0}', + 'Something has gone wrong on the Web Server.' => 'Neco se na webovém serveru pokazilo.', + 'Subpage' => 'Podstránka', + 'Thanks for creating an Account with the {0}. Please follow the link below to verify your email address: {1}' => 'Dekujeme za vytvorení úctu s {0}. Postupujte podle níže uvedeného odkazu a overte svou e-mailovou adresu: {1}', + 'The page you are looking for can not be found.' => 'Stránka, kterou hledáte, nelze nalézt', + 'This could be the result of an invalid Page request.' => 'Mohlo by to být dusledkem neplatné žádosti o stránku', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => 'Muže to být výsledek odstranené stránky, zmenené jméno nebo docasne nedostupná stránka.', + 'To reset your password, complete this form: {0}.' => 'Chcete-li obnovit heslo, vyplnte tento formulár: {0}. "', + 'Troubleshooting' => 'Odstranování problému', + 'Unauthorized' => 'Neoprávnený', + 'Welcome' => 'Vítejte', + 'You are not authorized to access this resource.' => 'Nemáte oprávnení k prístupu k tomuto prostredku', + 'Your session expired. Please try again!' => 'Platnost vaší relace vypršela. Prosím zkuste to znovu!', +); \ No newline at end of file diff --git a/app/Language/DA/messages.php b/app/Language/DA/messages.php index dccc481c..a06eeb8f 100644 --- a/app/Language/DA/messages.php +++ b/app/Language/DA/messages.php @@ -1,10 +1,21 @@ '', - 'Method not allowed' => '', + 'Bad Request' => 'Ugyldig anmodning', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => 'Forbudt', + 'Go to our home page and navigate to the content in question.' => 'Gå til vores hjemmeside og find det pågældende indhold.', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => 'Hvis du har indtastet din URL manuelt bedes du tjekke den for evt fejl.', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', + 'Internal Server Error' => 'Intern serverfejl', + 'Method not allowed' => 'Ikke gyldig "method"', + 'Referrer: {0}' => 'Henvisninger: {0}', + 'Regards,' => '', 'Service unavailable' => '', - 'Something has gone wrong on the Web Server.' => 'Der er gået noget galt på serveren.', + 'Something has gone wrong on the Web Server.' => 'Der er sket en fejl på web-serveren', 'The :attribute and :other must be different.' => ':attribute og :other skal være forskellige.', 'The :attribute and :other must match.' => ':attribute and :other skal være ens.', 'The :attribute confirmation does not match.' => ':attribute bekræftelsen er ikke identiske.', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => ':attribute skal indeholde :size elementer', 'The :attribute must have at least :min items.' => ':attribute skal indeholde mindst :min elementer', 'The :attribute must have between :min and :max items.' => ':attribute skal indeholde imellem :min og :max elementer', + 'The page you are looking for can not be found.' => 'Siden du leder efter findes ikke.', 'The selected :attribute is invalid.' => 'Det eller den valgte :attribute er ikke gyldig', - 'This could be the result of an invalid Page request.' => 'Dette kan være konsekvensen af et ugyldigt side valg', - 'This site is temporarily unavailable.' => 'Denne side er midlertidigt nede.', - 'Unauthorized' => 'Uautoriseret', - 'Validation Token has expired. Please try again!' => 'Validerings koden er udløbet. Prøv igen!', + 'This could be the result of an invalid Page request.' => 'Dette kan være resultatet af et forsøg på at til går en side der ikke findes', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => 'Dette kan være et resultat af at siden er blevet flyttet, navnet blevet ændret eller at siden er midlertidigt nede.', + 'Troubleshooting' => 'Fejlfinding', + 'Unauthorized' => 'uautoriseret', + 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/DE/messages.php b/app/Language/DE/messages.php index 109f1da7..1f05c3e3 100644 --- a/app/Language/DE/messages.php +++ b/app/Language/DE/messages.php @@ -1,8 +1,19 @@ '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/EN/messages.php b/app/Language/EN/messages.php index 109f1da7..1f05c3e3 100644 --- a/app/Language/EN/messages.php +++ b/app/Language/EN/messages.php @@ -1,8 +1,19 @@ '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/ES/messages.php b/app/Language/ES/messages.php index 109f1da7..1f05c3e3 100644 --- a/app/Language/ES/messages.php +++ b/app/Language/ES/messages.php @@ -1,8 +1,19 @@ '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/FA/messages.php b/app/Language/FA/messages.php index b9e034d1..3d28f045 100644 --- a/app/Language/FA/messages.php +++ b/app/Language/FA/messages.php @@ -1,56 +1,70 @@ '', + 'Bad Request' => '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => 'به صفحه اصلی بروید و به صفحه مورد نظر خود رجوع کنید.', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => 'اگر URL را هجی کرده اید, دوباره آن را بررسی کنید', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', + 'Internal Server Error' => 'خطای داخلی سرور', 'Method not allowed' => '', + 'Referrer: {0}' => 'ارجاع: {0}', + 'Regards,' => '', 'Service unavailable' => '', - 'Something has gone wrong on the Web Server.' => 'مشکلی در سمت سرور وب بوجود آمده است.', + 'Something has gone wrong on the Web Server.' => 'خطایی در سرور وب بوجود آمده است', 'The :attribute and :other must be different.' => ':attribute و :other باید متفاوت باشد.', 'The :attribute and :other must match.' => ':attribute و :other باید مطابقت داشته باشد.', - 'The :attribute confirmation does not match.' => 'تاییدیه :attribute مطابقت ندارد.', + 'The :attribute confirmation does not match.' => 'تایید :attribute مطابقت ندارد.', 'The :attribute does not match the format :format.' => ':attribute با فرمت :format مطابقت ندارد.', - 'The :attribute field is required when :other is :value.' => ':attribute زمانی که مقدار :other برابر :value است، ضروری میباشد.', - 'The :attribute field is required when :values is not present.' => ':attribute زمانی که :other وارد نشده باشد، ضروری است.', - 'The :attribute field is required when :values is present.' => ':attribute زمانی که :other وارد شده باشد، ضروری است.', - 'The :attribute field is required.' => ':attribute ضروری میباشد.', - 'The :attribute field must be true or false' => ':attribute باید مقدارش true یا false باشد.', - 'The :attribute format is invalid.' => 'فرمت :attribute نامعتبر است.', - 'The :attribute has already been taken.' => ':attribute قبلا استفاده شده است.', - 'The :attribute is not a valid URL.' => ':attribute یک پیوند معتبر نیست..', - 'The :attribute is not a valid date.' => ':attribute یک تاریخ معتبر نیست.', + 'The :attribute field is required when :other is :value.' => 'فیلد :attribute ضروری است وقتی :other بیشتر از :value است.', + 'The :attribute field is required when :values is not present.' => 'فیلد :attribute ضروری است وقتی :values وجود ندارد.', + 'The :attribute field is required when :values is present.' => 'فیلد :attribute ضروری است وقتی :values وجود دارد.', + 'The :attribute field is required.' => 'فیلد :attribute ضروری است', + 'The :attribute field must be true or false' => 'فیلد :attribute باید درست یا غلط باشد', + 'The :attribute format is invalid.' => 'فرمت فیلد :attribute نامعتبر است.', + 'The :attribute has already been taken.' => 'فیلد :attribute قبلا استفاده شده است.', + 'The :attribute is not a valid URL.' => 'فیلد :attribute یک پیوند معتبر نیست.', + 'The :attribute is not a valid date.' => 'فیلد :attribute یک تاریخ معتبر نیست.', 'The :attribute may not be greater than :max characters.' => ':attribute نباید بیشتر از :max کاراکتر باشد.', 'The :attribute may not be greater than :max kilobytes.' => ':attribute نباید بیشتر از :max کیلوبایت باشد.', - 'The :attribute may not be greater than :max.' => ':attribute باید بیشتر از :max باشد.', - 'The :attribute may not have more than :max items.' => ':attribute نباید بیشتر از :max آیتم داشته باشد.', - 'The :attribute may only contain letters and numbers.' => ':attribute فقط میتواند شامل حروف و اعداد باشد.', - 'The :attribute may only contain letters, numbers, and dashes.' => ':attribute فقط میتواند شامل حروف، اعداد و خط تیره باشد.', - 'The :attribute may only contain letters.' => ':attribute فقط میتواند شامل حروف باشد.', + 'The :attribute may not be greater than :max.' => ':attribute نباید بیشتر از :max باشد.', + 'The :attribute may not have more than :max items.' => ':attribute نباید بیشتر از :max مورد داشته باشد.', + 'The :attribute may only contain letters and numbers.' => ':attribute فقط شامل اعداد و حروف میباشد.', + 'The :attribute may only contain letters, numbers, and dashes.' => ':attribute فقط شامل خط فاصله، اعداد و حروف میباشد.', + 'The :attribute may only contain letters.' => ':attribute فقط شامل حروف میباشد.', 'The :attribute must be :digits digits.' => ':attribute باید :digits رقم باشد.', 'The :attribute must be :size characters.' => ':attribute باید :size کاراکتر باشد.', - 'The :attribute must be :size kilobytes.' => ':attribute باید :kilobytes کیلوبایت باشد.', + 'The :attribute must be :size kilobytes.' => ':attribute باید :size کیلوبایت باشد.', 'The :attribute must be :size.' => ':attribute باید :size باشد.', - 'The :attribute must be a date after :date.' => ':attribute باید یک تاریخ بعد از :date باشد.', - 'The :attribute must be a date before :date.' => ':attribute باید یک تاریخ قبل از :date باشد.', - 'The :attribute must be a file of type: :values.' => ':attribute باید از نوع :values باشد.', + 'The :attribute must be a date after :date.' => ':attribute باید یک تاریخ پس از :date باشد.', + 'The :attribute must be a date before :date.' => ':attribute باید یک تاریخ پیش از :date باشد.', + 'The :attribute must be a file of type: :values.' => ':attribute باید یک فایل از نوع: :values باشد.', 'The :attribute must be a number.' => ':attribute باید یک عدد باشد.', 'The :attribute must be a valid IP address.' => ':attribute باید یک آی پی آدرس معتبر باشد.', - 'The :attribute must be accepted.' => ':attribute باید تایید شده باشد.', + 'The :attribute must be accepted.' => ':attribute باید پذیرفته شود.', 'The :attribute must be an array.' => ':attribute باید یک آرایه باشد.', 'The :attribute must be an image.' => ':attribute باید یک تصویر باشد.', - 'The :attribute must be an integer.' => ':attribute باید از نوع عددی باشد.', + 'The :attribute must be an integer.' => ':attribute باید یک integer باشد.', 'The :attribute must be at least :min characters.' => ':attribute باید حداقل :min کاراکتر باشد.', - 'The :attribute must be at least :min kilobytes.' => ':attribute باید حداقل :min کیلوبایت باشد.', - 'The :attribute must be at least :min.' => ':attribute باید حداقل باید :min باشد.', - 'The :attribute must be between :min and :max characters.' => ':attribute باید بیت :min و :max کاراکتر باشد.', - 'The :attribute must be between :min and :max digits.' => ':attribute باید بین :min و :max رقم باشد.', - 'The :attribute must be between :min and :max kilobytes.' => ':attribute باید بین :min و :max کیلوبایت باشد.', - 'The :attribute must be between :min and :max.' => ':attribute باید بین :min و :max باشد.', - 'The :attribute must contain :size items.' => ':attribute باید شامل :size آیتم باشد.', - 'The :attribute must have at least :min items.' => ':attribute باید حداقل شامل :min آیتم باشد.', - 'The :attribute must have between :min and :max items.' => ':attribute باید بین :min و :max آیتم باشد.', + 'The :attribute must be at least :min kilobytes.' => ':attribute باید حداقل :min کیلوبایت باشد باشد.', + 'The :attribute must be at least :min.' => ':attribute باید حداقل :min باشد.', + 'The :attribute must be between :min and :max characters.' => ':attribute باید بین :min تا :max کاراکتر باشد.', + 'The :attribute must be between :min and :max digits.' => ':attribute باید بین :min تا :max رقم باشد.', + 'The :attribute must be between :min and :max kilobytes.' => ':attribute باید بین :min تا :max کیلوبایت باشد.', + 'The :attribute must be between :min and :max.' => ':attribute باید بین :min تا :max باشد.', + 'The :attribute must contain :size items.' => ':attribute باید شامل :size مورد باشد.', + 'The :attribute must have at least :min items.' => ':attribute باید حداقل :min مورد باشد.', + 'The :attribute must have between :min and :max items.' => ':attribute باید بین :min تا :max مورد باشد.', + 'The page you are looking for can not be found.' => 'صفحه ای که دنبال آن هستید را نمیتوان پیدا کرد', 'The selected :attribute is invalid.' => ':attribute انتخابی نامعتبر است.', - 'This could be the result of an invalid Page request.' => 'این میتواند نتیجه یک درخواست نامعتبر باشد.', - 'This site is temporarily unavailable.' => 'این سایت موقتا در دسترس نمیباشد.', - 'Unauthorized' => 'غیر مجاز', - 'Validation Token has expired. Please try again!' => 'کیلد تایید منقضی شده است. لطفا دوباره تلاش کنید!', + 'This could be the result of an invalid Page request.' => 'این ممکن است نتیجه یک درخواست نامعتبر باشد.', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => 'این ممکن است نتیجه یک صفحه که پاک شده باشد, انتقال یافته باشد و یا اینکه موقتا دردسترس نیباشد, باشد.', + 'Troubleshooting' => 'اشکال زدایی', + 'Unauthorized' => '', + 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/FR/messages.php b/app/Language/FR/messages.php index 109f1da7..d3448186 100644 --- a/app/Language/FR/messages.php +++ b/app/Language/FR/messages.php @@ -1,10 +1,21 @@ '', - 'Method not allowed' => '', + 'Bad Request' => 'Requète incorrect', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => 'Accès interdit', + 'Go to our home page and navigate to the content in question.' => 'Retournez sur l\'accueil et naviguez vers le contenu en question.', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => 'Si vous avez écrit l\'URL manuellement, vérifiez l\'orthographe.', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', + 'Internal Server Error' => 'Erreur interne du serveur', + 'Method not allowed' => 'Méthode non autorisée', + 'Referrer: {0}' => 'Referrer: {0}', + 'Regards,' => '', 'Service unavailable' => '', - 'Something has gone wrong on the Web Server.' => '', + 'Something has gone wrong on the Web Server.' => 'Une erreur inconnue est apparue sur le serveur Web.', 'The :attribute and :other must be different.' => '', 'The :attribute and :other must match.' => '', 'The :attribute confirmation does not match.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => 'La page que vous cherchez n\'existe pas', 'The selected :attribute is invalid.' => '', - 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', - 'Unauthorized' => '', + 'This could be the result of an invalid Page request.' => 'Cela peut-être le résultat d\'une requète invalide.', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => 'La page a peut-être été supprimé, l\'url a changé ou la page est temporairement indisponible.', + 'Troubleshooting' => 'Dépannage', + 'Unauthorized' => 'Interdit', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/HU/messages.php b/app/Language/HU/messages.php deleted file mode 100644 index 109f1da7..00000000 --- a/app/Language/HU/messages.php +++ /dev/null @@ -1,56 +0,0 @@ - '', - 'Method not allowed' => '', - 'Service unavailable' => '', - 'Something has gone wrong on the Web Server.' => '', - 'The :attribute and :other must be different.' => '', - 'The :attribute and :other must match.' => '', - 'The :attribute confirmation does not match.' => '', - 'The :attribute does not match the format :format.' => '', - 'The :attribute field is required when :other is :value.' => '', - 'The :attribute field is required when :values is not present.' => '', - 'The :attribute field is required when :values is present.' => '', - 'The :attribute field is required.' => '', - 'The :attribute field must be true or false' => '', - 'The :attribute format is invalid.' => '', - 'The :attribute has already been taken.' => '', - 'The :attribute is not a valid URL.' => '', - 'The :attribute is not a valid date.' => '', - 'The :attribute may not be greater than :max characters.' => '', - 'The :attribute may not be greater than :max kilobytes.' => '', - 'The :attribute may not be greater than :max.' => '', - 'The :attribute may not have more than :max items.' => '', - 'The :attribute may only contain letters and numbers.' => '', - 'The :attribute may only contain letters, numbers, and dashes.' => '', - 'The :attribute may only contain letters.' => '', - 'The :attribute must be :digits digits.' => '', - 'The :attribute must be :size characters.' => '', - 'The :attribute must be :size kilobytes.' => '', - 'The :attribute must be :size.' => '', - 'The :attribute must be a date after :date.' => '', - 'The :attribute must be a date before :date.' => '', - 'The :attribute must be a file of type: :values.' => '', - 'The :attribute must be a number.' => '', - 'The :attribute must be a valid IP address.' => '', - 'The :attribute must be accepted.' => '', - 'The :attribute must be an array.' => '', - 'The :attribute must be an image.' => '', - 'The :attribute must be an integer.' => '', - 'The :attribute must be at least :min characters.' => '', - 'The :attribute must be at least :min kilobytes.' => '', - 'The :attribute must be at least :min.' => '', - 'The :attribute must be between :min and :max characters.' => '', - 'The :attribute must be between :min and :max digits.' => '', - 'The :attribute must be between :min and :max kilobytes.' => '', - 'The :attribute must be between :min and :max.' => '', - 'The :attribute must contain :size items.' => '', - 'The :attribute must have at least :min items.' => '', - 'The :attribute must have between :min and :max items.' => '', - 'The selected :attribute is invalid.' => '', - 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', - 'Unauthorized' => '', - 'Validation Token has expired. Please try again!' => '', -); diff --git a/app/Language/IT/messages.php b/app/Language/IT/messages.php index 109f1da7..1f05c3e3 100644 --- a/app/Language/IT/messages.php +++ b/app/Language/IT/messages.php @@ -1,8 +1,19 @@ '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/JA/messages.php b/app/Language/JA/messages.php index 109f1da7..1f05c3e3 100644 --- a/app/Language/JA/messages.php +++ b/app/Language/JA/messages.php @@ -1,8 +1,19 @@ '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/NL/messages.php b/app/Language/NL/messages.php index 109f1da7..1f05c3e3 100644 --- a/app/Language/NL/messages.php +++ b/app/Language/NL/messages.php @@ -1,8 +1,19 @@ '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/PL/messages.php b/app/Language/PL/messages.php index 109f1da7..1f05c3e3 100644 --- a/app/Language/PL/messages.php +++ b/app/Language/PL/messages.php @@ -1,8 +1,19 @@ '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/RO/messages.php b/app/Language/RO/messages.php index 109f1da7..1f05c3e3 100644 --- a/app/Language/RO/messages.php +++ b/app/Language/RO/messages.php @@ -1,8 +1,19 @@ '', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => '', + 'Go to our home page and navigate to the content in question.' => '', + 'Hello!' => '', + 'If you spelled the URL manually, double check the spelling.' => '', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => '', 'Internal Server Error' => '', 'Method not allowed' => '', + 'Referrer: {0}' => '', + 'Regards,' => '', 'Service unavailable' => '', 'Something has gone wrong on the Web Server.' => '', 'The :attribute and :other must be different.' => '', @@ -48,9 +59,12 @@ 'The :attribute must contain :size items.' => '', 'The :attribute must have at least :min items.' => '', 'The :attribute must have between :min and :max items.' => '', + 'The page you are looking for can not be found.' => '', 'The selected :attribute is invalid.' => '', 'This could be the result of an invalid Page request.' => '', - 'This site is temporarily unavailable.' => '', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => '', + 'Troubleshooting' => '', 'Unauthorized' => '', 'Validation Token has expired. Please try again!' => '', + 'Whoops!' => '', ); diff --git a/app/Language/RU/messages.php b/app/Language/RU/messages.php index 49fdc160..290cd60f 100644 --- a/app/Language/RU/messages.php +++ b/app/Language/RU/messages.php @@ -1,56 +1,70 @@ 'Неправильный запрос', + 'Be right back.' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}' => '', + 'Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}' => '', + 'Forbidden' => 'Запрещено', + 'Go to our home page and navigate to the content in question.' => 'Перейдите на нашу домашнюю страницу к соответствующему контенту.', + 'Hello!' => 'Привет', + 'If you spelled the URL manually, double check the spelling.' => 'Если вы ввели URL вручную, дважды проверьте правильность написания.', + 'If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:' => 'Если у вас возникли проблемы с нажатием кнопки «{0}», скопируйте и вставьте указанный ниже URL-адрес в свой веб-браузер:', 'Internal Server Error' => 'Внутрення ошибка сервера', 'Method not allowed' => 'Метод не разрешен', + 'Referrer: {0}' => 'Ссылающийся: {0}', + 'Regards,' => 'С уважением', 'Service unavailable' => 'Сервис недоступен', - 'Something has gone wrong on the Web Server.' => 'Ошибка на сервере', - 'The :attribute and :other must be different.' => ':attribute и :other должны отличаться', - 'The :attribute and :other must match.' => ':attribute и :other должны совпадать', - 'The :attribute confirmation does not match.' => ':attribute не совпадает подтверждение. ', - 'The :attribute does not match the format :format.' => ':attribute не соответствует формату :format.', - 'The :attribute field is required when :other is :value.' => 'Поле :attribute обязательно, когда :other является :value', - 'The :attribute field is required when :values is not present.' => 'Поле :attribute обязательно, если :values не указано.', - 'The :attribute field is required when :values is present.' => 'Поле :attribute обязательно, если :values указано. ', + 'Something has gone wrong on the Web Server.' => 'На веб-сервере что-то пошло не так.', + 'The :attribute and :other must be different.' => ':attribute и :other должны быть разными', + 'The :attribute and :other must match.' => ':attribute и :other должны соответствовать', + 'The :attribute confirmation does not match.' => 'Подтверждение :attribute не совпадает', + 'The :attribute does not match the format :format.' => ':attribute не соответствует формату :format', + 'The :attribute field is required when :other is :value.' => 'Поле :attribute обязательно для заполнения, когда :other имеет значение :value', + 'The :attribute field is required when :values is not present.' => 'Поле :attribute обязательно для заполнения, когда :values не указано', + 'The :attribute field is required when :values is present.' => 'Поле :attribute обязательно для заполнения, когда :values указано', 'The :attribute field is required.' => 'Поле :attribute является обязательным', - 'The :attribute field must be true or false' => 'Поле :attribute должно быть Истина или Ложь. ', - 'The :attribute format is invalid.' => 'Формат :attribute является неправильным', - 'The :attribute has already been taken.' => ':attribute уже был взят.', - 'The :attribute is not a valid URL.' => 'attribute является неправильным URL', - 'The :attribute is not a valid date.' => 'attribute является неправильной датой', - 'The :attribute may not be greater than :max characters.' => ':attribute не может быть больше :max символов', - 'The :attribute may not be greater than :max kilobytes.' => ':attribute не может быть больше :max килобайт', - 'The :attribute may not be greater than :max.' => ':attribute не может быть больше :max.', - 'The :attribute may not have more than :max items.' => ':attribute может иметь значене не более :max', - 'The :attribute may only contain letters and numbers.' => ':attribute может содержать только буквы и цифры', - 'The :attribute may only contain letters, numbers, and dashes.' => ':attribute может содержать только буквы,цифры и тире.', - 'The :attribute may only contain letters.' => ':attribute может содержать только буквы.', - 'The :attribute must be :digits digits.' => ':attribute должно иметь :digits цифр', - 'The :attribute must be :size characters.' => ':attribute должно иметь :size символов', - 'The :attribute must be :size kilobytes.' => ':attribute должно иметь :size килобайт ', - 'The :attribute must be :size.' => ':attribute должно быть размером :size', - 'The :attribute must be a date after :date.' => ':attribute должно быть датой после :date', - 'The :attribute must be a date before :date.' => ':attribute должно быть датой до :date', - 'The :attribute must be a file of type: :values.' => ':attribute должен быть файлом типа :values', - 'The :attribute must be a number.' => ':attribute должен быть числом.', - 'The :attribute must be a valid IP address.' => ':attribute должен быть правильным IP адресом', - 'The :attribute must be accepted.' => ':attribute должен быть принят', - 'The :attribute must be an array.' => ':attribute должен быть массивом', - 'The :attribute must be an image.' => ':attribute должен быть изображением', - 'The :attribute must be an integer.' => ':attribute должен быть целым числом', - 'The :attribute must be at least :min characters.' => ':attribute должен быть не менее символов', - 'The :attribute must be at least :min kilobytes.' => ':attribute должен быть не менее килобайт', + 'The :attribute field must be true or false' => 'Поле :attribute должно быть истинным или ложным', + 'The :attribute format is invalid.' => ':attribute имеет неверный формат', + 'The :attribute has already been taken.' => ':attribute уже используется', + 'The :attribute is not a valid URL.' => ':attribute имеет неправильный URL', + 'The :attribute is not a valid date.' => ':attribute имеет неправильную дату', + 'The :attribute may not be greater than :max characters.' => ':attribute не более :max символов', + 'The :attribute may not be greater than :max kilobytes.' => ':attribute не более :max килобайт', + 'The :attribute may not be greater than :max.' => ':attribute не более :max', + 'The :attribute may not have more than :max items.' => ':attribute не более :max элементов', + 'The :attribute may only contain letters and numbers.' => ':attribute может содержать только буквы и цифры.', + 'The :attribute may only contain letters, numbers, and dashes.' => ':attribute может содержать только буквы, цифры и дефис.', + 'The :attribute may only contain letters.' => ':attribute может содержать только буквы', + 'The :attribute must be :digits digits.' => ':attribute должно быть :digits цифр', + 'The :attribute must be :size characters.' => ':attribute должно быть :size символов', + 'The :attribute must be :size kilobytes.' => ':attribute должно быть :size килобайт', + 'The :attribute must be :size.' => ':attribute должно быть :size ', + 'The :attribute must be a date after :date.' => ':attribute должна быть дата после :date', + 'The :attribute must be a date before :date.' => ':attribute должна быть дата до :date', + 'The :attribute must be a file of type: :values.' => ':attribute необходим тип файла :values', + 'The :attribute must be a number.' => ':attribute должен быть числом', + 'The :attribute must be a valid IP address.' => ':attribute должен быть правильный IP адрес', + 'The :attribute must be accepted.' => ':attribute должно быть приняты', + 'The :attribute must be an array.' => ':attribute должно быть массивом', + 'The :attribute must be an image.' => ':attribute должно быть картинкой', + 'The :attribute must be an integer.' => ':attribute должно быть целым', + 'The :attribute must be at least :min characters.' => ':attribute должно быть не менее :min символов', + 'The :attribute must be at least :min kilobytes.' => ':attribute должно быть не менее :min килобайт', 'The :attribute must be at least :min.' => ':attribute должно быть не менее :min.', - 'The :attribute must be between :min and :max characters.' => ':attribute должно быть от :min до :max символами', - 'The :attribute must be between :min and :max digits.' => ':attribute должно быть от :min до :max цифр', - 'The :attribute must be between :min and :max kilobytes.' => ':attribute должно быть от :min до :max килобайт', - 'The :attribute must be between :min and :max.' => ':attribute должно быть от :min до :max.', - 'The :attribute must contain :size items.' => ':attribute должен быть размером :size', - 'The :attribute must have at least :min items.' => ':attribute должно быть не менее: :min значения.', - 'The :attribute must have between :min and :max items.' => ':attribute должно быть между значениями: :min и :max .', - 'The selected :attribute is invalid.' => 'Выбранный :attribute недопустим.', - 'This could be the result of an invalid Page request.' => 'Это может быть результатом неверного запроса страницы.', - 'This site is temporarily unavailable.' => 'Сайт временно недоступен.', + 'The :attribute must be between :min and :max characters.' => ':attribute должно быть между :min и :max символов', + 'The :attribute must be between :min and :max digits.' => ':attribute должно быть между :min и :max цифрами', + 'The :attribute must be between :min and :max kilobytes.' => ':attribute должно быть между :min и :max килобайт', + 'The :attribute must be between :min and :max.' => ':attribute должно быть между :min и :max.', + 'The :attribute must contain :size items.' => ':attribute должен содержать :size элементов.', + 'The :attribute must have at least :min items.' => ':attribute должен иметь по крайней мере :min элементов.', + 'The :attribute must have between :min and :max items.' => ':attribute должен иметь между :min and :max элементов', + 'The page you are looking for can not be found.' => 'Страница, которую вы ищете не может быть найдена.', + 'The selected :attribute is invalid.' => 'Выбранный :attribute недействителен.', + 'This could be the result of an invalid Page request.' => 'Это может быть результатом запроса неправильной страницы.', + 'This could be the result of the page being removed, the name being changed or the page being temporarily unavailable.' => 'Это может быть результатом удаления страницы, её переименования или временной недоступности', + 'Troubleshooting' => 'Исправление проблем', 'Unauthorized' => 'Неразрешенный', - 'Validation Token has expired. Please try again!' => 'Время токена проверки истекло. Пожалуйста, попробуйте еще раз!', + 'Validation Token has expired. Please try again!' => 'Токен проверки просрочен. Пожалуйста, попробуйте еще раз!', + 'Whoops!' => '', ); diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Middleware/EncryptCookies.php similarity index 90% rename from app/Http/Middleware/EncryptCookies.php rename to app/Middleware/EncryptCookies.php index f41ca066..b1fa671d 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Middleware/EncryptCookies.php @@ -1,6 +1,6 @@ app = $app; + } + + /** + * Handle the given request and get the response. + * + * @param $request + * @param $next + * + * @return mixed + */ + public function handle($request, Closure $next) + { + $response = $next($request, $next); + + // Add the profilers to the Response instance Content. + $config = $this->app['config']; + + // Get the debug flag from configuration. + $debug = $config->get('app.debug', false); + + if ($debug && $this->canPatchContent($response)) { + $withDatabase = $config->get('profiler.withDatabase', false); + + $content = str_replace( + array( + '', + ), + array( + $this->getStatistics($request, $withDatabase), + ), + $response->getContent() + ); + + // + $response->setContent($content); + } + + return $response; + } + + protected function canPatchContent(SymfonyResponse $response) + { + if ((! $response instanceof Response) && is_subclass_of($response, 'Symfony\Component\Http\Foundation\Response')) { + return false; + } + + $contentType = $response->headers->get('Content-Type'); + + return Str::is('text/html*', $contentType); + } + + protected function getStatistics(SymfonyRequest $request, $withDatabase) + { + $requestTime = $request->server('REQUEST_TIME_FLOAT'); + + $elapsedTime = sprintf("%01.4f", (microtime(true) - $requestTime)); + + // + $memoryUsage = static::formatSize(memory_get_usage()); + + // + $umax = sprintf("%0d", intval(25 / $elapsedTime)); + + if (! $withDatabase) { + return __('Elapsed Time: {0} sec | Memory Usage: {1} | UMAX: {2}', $elapsedTime, $memoryUsage, $umax); + } + + $queryLog = $this->getQueryLog(); + + $queries = count($queryLog); + + return __('Elapsed Time: {0} sec | Memory Usage: {1} | SQL: {2} {3, plural, one{query} other{queries}} | UMAX: {4}', $elapsedTime, $memoryUsage, $queries, $queries, $umax); + } + + protected function getQueryLog() + { + try { + $connection = $this->app['db']->connection(); + + return $connection->getQueryLog(); + } + catch (PDOException $e) { + return array(); + } + } + + protected static function formatSize($bytes, $decimals = 2) + { + $size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB'); + + $factor = floor((strlen($bytes) - 1) / 3); + + return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) .@$size[$factor]; + } +} diff --git a/app/Middleware/MarkNotificationAsRead.php b/app/Middleware/MarkNotificationAsRead.php new file mode 100644 index 00000000..689c921a --- /dev/null +++ b/app/Middleware/MarkNotificationAsRead.php @@ -0,0 +1,64 @@ +has('read')) { + $notification = Notification::where('uuid', $request->input('read'))->first(); + + if (! is_null($notification)) { + $this->handleNotification($notification); + } + } + + return $next($request); + } + + protected function handleNotification(Notification $notification) + { + $guard = $this->getGuardByAuthModel($notification->notifiable_type); + + if (! is_null($user = Auth::guard($guard)->user()) && ($user->id == $notification->notifiable_id)) { + $notification->markAsRead(); + } + } + + protected function getGuardByAuthModel($model) + { + if (is_null($provider = $this->getAuthProviderByModel($model))) { + return; + } + + $guards = Config::get('auth.guards', array()); + + foreach ($guards as $guard => $options) { + if ($options['provider'] == $provider) { + return $guard; + } + } + } + + protected function getAuthProviderByModel($model) + { + $providers = Config::get('auth.providers', array()); + + foreach ($providers as $provider => $options) { + if ($options['model'] == $model) { + return $provider; + } + } + } +} diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Middleware/RedirectIfAuthenticated.php similarity index 97% rename from app/Http/Middleware/RedirectIfAuthenticated.php rename to app/Middleware/RedirectIfAuthenticated.php index fad46804..6310cf03 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Middleware/RedirectIfAuthenticated.php @@ -1,6 +1,6 @@ getStatusCode(); if (View::exists("Errors/{$status}")) { - $view = View::makeLayout('Default', 'Bootstrap') + $view = View::make('Layouts/Default') ->shares('title', "Error {$status}") ->nest('content', "Errors/{$status}", array('exception' => $e)); @@ -111,6 +110,7 @@ protected function convertExceptionToResponse(Exception $e, Request $request) } return parent::convertExceptionToResponse($e, $request); + } /** diff --git a/app/Platform/Start.php b/app/Platform/Start.php new file mode 100644 index 00000000..aa14db55 --- /dev/null +++ b/app/Platform/Start.php @@ -0,0 +1,209 @@ +detectEnvironment(array( + 'local' => array( + 'darkstar', + 'darkstar.localdomain', + 'darkstar.example.org' + ), +)); + +//-------------------------------------------------------------------------- +// Bind Paths +//-------------------------------------------------------------------------- + +$paths = array( + 'base' => BASEPATH, + 'app' => APPPATH, + 'public' => WEBPATH, + 'storage' => STORAGE_PATH, +); + +$app->bindInstallPaths($paths); + +//-------------------------------------------------------------------------- +// Bind The Application In The Container +//-------------------------------------------------------------------------- + +$app->instance('app', $app); + +//-------------------------------------------------------------------------- +// Bind The Exception Handler Interface +//-------------------------------------------------------------------------- + +$app->singleton( + 'Nova\Foundation\Contracts\ExceptionHandlerInterface', 'App\Platform\Exceptions\Handler' +); + +//-------------------------------------------------------------------------- +// Load The Framework Facades +//-------------------------------------------------------------------------- + +Facade::clearResolvedInstances(); + +Facade::setFacadeApplication($app); + +//-------------------------------------------------------------------------- +// Register Facade Aliases To Full Classes +//-------------------------------------------------------------------------- + +$app->registerCoreContainerAliases(); + +//-------------------------------------------------------------------------- +// Register The Environment Variables +//-------------------------------------------------------------------------- + +with($envVariables = new EnvironmentVariables( + $app->getEnvironmentVariablesLoader() +))->load($env); + +//-------------------------------------------------------------------------- +// Register The Config Manager +//-------------------------------------------------------------------------- + +$app->instance('config', $config = new ConfigRepository( + $app->getConfigLoader(), $env +)); + +//-------------------------------------------------------------------------- +// Register Application Exception Handling +//-------------------------------------------------------------------------- + +$app->startExceptionHandling(); + +if ($env !== 'testing') { + ini_set('display_errors', 'Off'); +} + +//-------------------------------------------------------------------------- +// Register The Application Middleware +//-------------------------------------------------------------------------- + +$app->middleware( + $config->get('app.middleware', array()) +); + +//-------------------------------------------------------------------------- +// Set The Default Timezone From Configuration +//-------------------------------------------------------------------------- + +date_default_timezone_set( + $config->get('app.timezone', 'Europe/London') +); + +//-------------------------------------------------------------------------- +// Register The Alias Loader +//-------------------------------------------------------------------------- + +$aliases = $config->get('app.aliases', array()); + +AliasLoader::getInstance($aliases)->register(); + +//-------------------------------------------------------------------------- +// Enable HTTP Method Override +//-------------------------------------------------------------------------- + +Request::enableHttpMethodParameterOverride(); + +//-------------------------------------------------------------------------- +// Enable Trusting Of X-Sendfile Type Header +//-------------------------------------------------------------------------- + +BinaryFileResponse::trustXSendfileTypeHeader(); + +//-------------------------------------------------------------------------- +// Register The Core Service Providers +//-------------------------------------------------------------------------- + +$app->getProviderRepository()->load( + $app, $config->get('app.providers', array()) +); + +//-------------------------------------------------------------------------- +// Register Booted Start Files +//-------------------------------------------------------------------------- + +$app->booted(function() use ($app, $env) +{ + +//-------------------------------------------------------------------------- +// Load The Environment Start Script +//-------------------------------------------------------------------------- + +$path = $app['path'] .DS .'Platform' .DS .'Environment' .DS .ucfirst($env) .'.php'; + +if (is_readable($path)) require $path; + +//-------------------------------------------------------------------------- +// Load The Boootstrap Script +//-------------------------------------------------------------------------- + +$path = $app['path'] .DS .'Bootstrap.php'; + +if (is_readable($path)) require $path; + +}); + +//-------------------------------------------------------------------------- +// Return The Application +//-------------------------------------------------------------------------- + +return $app; diff --git a/app/Policies/.gitkeep b/app/Policies/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 8a4fc49f..3b6df3e5 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,11 +2,12 @@ namespace App\Providers; -use Nova\Support\ServiceProvider; +use Nova\Foundation\Support\Providers\AppServiceProvider as ServiceProvider; class AppServiceProvider extends ServiceProvider { + /** * Bootstrap the Application Events. * @@ -20,11 +21,14 @@ public function boot() /** * Register the Application's Service Provider. * + * This service provider is a convenient place to register your modules + * services in the IoC container. If you wish, you may make additional + * methods or service providers to keep the code more focused and granular. + * * @return void */ public function register() { // } - } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 83a2a95c..30563824 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,7 +2,7 @@ namespace App\Providers; -use Nova\Auth\Contracts\Access\GateInterface as Gate; +use Nova\Auth\Access\GateInterface as Gate; use Nova\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; @@ -21,6 +21,7 @@ class AuthServiceProvider extends ServiceProvider /** * Register any application authentication / authorization services. * + * @param Nova\Auth\Access\GateInterface $gate * @return void */ public function boot(Gate $gate) diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index eec193b0..74d86703 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -2,6 +2,7 @@ namespace App\Providers; +use Nova\Http\Request; use Nova\Routing\Router; use Nova\Support\Facades\Broadcast; use Nova\Support\ServiceProvider; @@ -17,9 +18,12 @@ class BroadcastServiceProvider extends ServiceProvider */ public function boot(Router $router) { - $this->loadBroadcastRoutes($router); + $router->post('broadcasting/auth', array('middleware' => 'web', function (Request $request) + { + return Broadcast::authenticate($request); + })); - $this->loadBroadcastChannels(); + require app_path('Routes/Channels.php'); } /** @@ -31,31 +35,4 @@ public function register() { // } - - /** - * Load the Broadcasting Routes. - * - * @param Nova\Routing\Router $router - */ - protected function loadBroadcastRoutes(Router $router) - { - $router->group(array('middleware' => 'web'), function ($router) - { - $router->post('broadcasting/auth', function (Request $request) - { - return Broadcast::authenticate($request); - }); - }); - } - - /** - * Load the Broadcasting Channels. - */ - protected function loadBroadcastChannels() - { - $path = app_path('Routes/Broadcast.php'); - - if (is_readable($path)) require $path; - } } - diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 52bb8cdd..3d84edc0 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -19,4 +19,20 @@ class EventServiceProvider extends ServiceProvider ), ); + + /** + * Register any other events for your application. + * + * @param \Nova\Events\Dispatcher $events + * @return void + */ + public function boot(Dispatcher $events) + { + parent::boot($events); + + // + $path = app_path('Events.php'); + + $this->loadEventsFrom($path); + } } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 4499b52a..4c34aa58 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -17,16 +17,16 @@ class RouteServiceProvider extends ServiceProvider /** - * Define your route pattern filters, etc. + * Define your route model bindings, pattern filters, etc. * * @param \Nova\Routing\Router $router * @return void */ public function boot(Router $router) { - // - parent::boot($router); + + // } /** @@ -37,14 +37,17 @@ public function boot(Router $router) */ public function map(Router $router) { - $router->group(array('prefix' => 'api', 'middleware' => 'api', 'namespace' => $this->namespace), function ($router) + $path = app_path('Routes'); + + $router->group(array('prefix' => 'api', 'middleware' => 'api', 'namespace' => $this->namespace), function ($router) use ($path) { - require app_path('Routes/Api.php'); + require $path .DS .'Api.php'; }); - $router->group(array('middleware' => 'web', 'namespace' => $this->namespace), function ($router) + $router->group(array('middleware' => 'web', 'namespace' => $this->namespace), function ($router) use ($path) { - require app_path('Routes/Web.php'); + require $path .DS .'Web.php'; }); } + } diff --git a/app/Routes/Api.php b/app/Routes/Api.php index f454914e..901ae03d 100644 --- a/app/Routes/Api.php +++ b/app/Routes/Api.php @@ -14,7 +14,7 @@ use Nova\Http\Request; -$router->get('user', function (Request $request) +Route::get('user', array('middleware' => 'auth:api', function (Request $request) { return $request->user(); -}); +})); diff --git a/app/Routes/Channels.php b/app/Routes/Channels.php index 3056dffd..44bceee2 100644 --- a/app/Routes/Channels.php +++ b/app/Routes/Channels.php @@ -11,8 +11,10 @@ | */ +use Modules\Users\Models\User; -Broadcast::channel('App.User.{id}', function ($user, $id) + +Broadcast::channel('Modules.Users.Models.User.{id}', function (User $user, $id) { return (int) $user->id === (int) $id; }); diff --git a/app/Routes/Console.php b/app/Routes/Console.php deleted file mode 100644 index 0ef21cb4..00000000 --- a/app/Routes/Console.php +++ /dev/null @@ -1,19 +0,0 @@ -comment('Hello, World!'); - -})->describe('Display a Hello World message'); diff --git a/app/Routes/Web.php b/app/Routes/Web.php index 681fd874..39e5fc5b 100644 --- a/app/Routes/Web.php +++ b/app/Routes/Web.php @@ -17,15 +17,14 @@ /** * The static Pages. */ -$router->get('/', 'Pages@display'); - -$router->get('pages/{slug}', 'Pages@display')->where('slug', '(.*)'); +Route::get('/', 'Pages@show'); +Route::get('pages/{slug}', 'Pages@show')->where('slug', '(.*)'); /** * The Language Changer. */ -$router->get('language/{language}', function (Request $request, $language) +Route::get('language/{language}', function (Request $request, $language) { $url = Config::get('app.url'); @@ -46,7 +45,7 @@ /** * Show the PHP information. */ -$router->get('phpinfo', function () +Route::get('phpinfo', function () { ob_start(); diff --git a/app/Start.php b/app/Start.php deleted file mode 100644 index 6f773630..00000000 --- a/app/Start.php +++ /dev/null @@ -1,109 +0,0 @@ -bindInstallPaths(array( - 'base' => BASEPATH, - 'app' => APPPATH, - 'public' => WEBPATH, - 'storage' => STORAGE_PATH, -)); - -//-------------------------------------------------------------------------- -// Bind The Application In The Container -//-------------------------------------------------------------------------- - -$app->instance('app', $app); - -//-------------------------------------------------------------------------- -// Bind Important Interfaces -//-------------------------------------------------------------------------- - -$app->singleton( - 'Nova\Http\Contracts\KernelInterface', 'App\Http\Kernel' -); - -$app->singleton( - 'Nova\Console\Contracts\KernelInterface', 'App\Console\Kernel' -); - -$app->singleton( - 'Nova\Foundation\Contracts\ExceptionHandlerInterface', 'App\Exceptions\Handler' -); - -//-------------------------------------------------------------------------- -// Detect The Application Environment -//-------------------------------------------------------------------------- - -$env = $app->detectEnvironment(array( - 'local' => array('darkstar'), -)); - -//-------------------------------------------------------------------------- -// Check For The Test Environment -//-------------------------------------------------------------------------- - -if (isset($unitTesting)) { - $app['env'] = $env = $testEnvironment; -} - -//-------------------------------------------------------------------------- -// Register Booted Start Files -//-------------------------------------------------------------------------- - -$app->booted(function () use ($app, $env) -{ - -//-------------------------------------------------------------------------- -// Load The Boootstrap Script -//-------------------------------------------------------------------------- - -$path = $app['path'] .DS .'Bootstrap.php'; - -if (is_readable($path)) require $path; - - -//-------------------------------------------------------------------------- -// Load The Environment Start Script -//-------------------------------------------------------------------------- - -$path = $app['path'] .DS .'Environment' .DS .ucfirst($env) .'.php'; - -if (is_readable($path)) require $path; - -}); - -//-------------------------------------------------------------------------- -// Return The Application -//-------------------------------------------------------------------------- - -return $app; diff --git a/app/Views/Default.php b/app/Views/Default.php deleted file mode 100644 index e96fdf41..00000000 --- a/app/Views/Default.php +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/app/Views/Default.tpl b/app/Views/Default.tpl new file mode 100644 index 00000000..7445acac --- /dev/null +++ b/app/Views/Default.tpl @@ -0,0 +1,5 @@ + + +{{ $content; }} diff --git a/app/Views/Emails/Notifications/Default.tpl b/app/Views/Emails/Notifications/Default.tpl new file mode 100644 index 00000000..085812e0 --- /dev/null +++ b/app/Views/Emails/Notifications/Default.tpl @@ -0,0 +1,199 @@ + + + + + + + + + + +@php + +$style = array( + /* Layout ------------------------------ */ + + 'body' => 'margin: 0; padding: 0; width: 100%; background-color: #F2F4F6;', + 'email-wrapper' => 'width: 100%; margin: 0; padding: 0; background-color: #F2F4F6;', + + /* Masthead ----------------------- */ + + 'email-masthead' => 'padding: 25px 0; text-align: center;', + 'email-masthead_name' => 'font-size: 16px; font-weight: bold; color: #2F3133; text-decoration: none; text-shadow: 0 1px 0 white;', + + 'email-body' => 'width: 100%; margin: 0; padding: 0; border-top: 1px solid #EDEFF2; border-bottom: 1px solid #EDEFF2; background-color: #FFF;', + 'email-body_inner' => 'width: auto; max-width: 570px; margin: 0 auto; padding: 0;', + 'email-body_cell' => 'padding: 35px;', + + 'email-footer' => 'width: auto; max-width: 570px; margin: 0 auto; padding: 0; text-align: center;', + 'email-footer_cell' => 'color: #AEAEAE; padding: 35px; text-align: center;', + + /* Body ------------------------------ */ + + 'body_action' => 'width: 100%; margin: 30px auto; padding: 0; text-align: center;', + 'body_sub' => 'margin-top: 25px; padding-top: 25px; border-top: 1px solid #EDEFF2;', + + /* Type ------------------------------ */ + + 'anchor' => 'color: #3869D4;', + 'header-1' => 'margin-top: 0; color: #2F3133; font-size: 19px; font-weight: bold; text-align: left;', + 'paragraph' => 'margin-top: 0; color: #74787E; font-size: 16px; line-height: 1.5em;', + 'paragraph-sub' => 'margin-top: 0; color: #74787E; font-size: 12px; line-height: 1.5em;', + 'paragraph-center' => 'text-align: center;', + + /* Buttons ------------------------------ */ + + 'button' => 'display: block; display: inline-block; width: 200px; min-height: 20px; padding: 10px; + background-color: #3869D4; border-radius: 3px; color: #ffffff; font-size: 15px; line-height: 25px; + text-align: center; text-decoration: none; -webkit-text-size-adjust: none;', + + 'button--green' => 'background-color: #22BC66;', + 'button--red' => 'background-color: #dc4d2f;', + 'button--blue' => 'background-color: #3869D4;', +); + +$fontFamily = 'font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif;'; + +@endphp + + + + + + +
+ + + + + + + + + + + + + + + +
+ + {{ config('app.name') }} + +
+ + + + +
+ +

+ @if (! empty($greeting)) + {{ $greeting }} + @else + @if ($level == 'error') + {{ __('Whoops!') }} + @else + {{ __('Hello!') }} + @endif + @endif +

+ + + @foreach ($introLines as $line) +

+ {{ $line }} +

+ @endforeach + + + @if (isset($actionText)) + + + + +
+ @php + switch ($level) { + case 'success': + $actionColor = 'button--green'; + break; + case 'error': + $actionColor = 'button--red'; + break; + default: + $actionColor = 'button--blue'; + } + @endphp + + + {{ $actionText }} + +
+ @endif + + + @foreach ($outroLines as $line) +

+ {{ $line }} +

+ @endforeach + + +

+ {{ __('Regards,') }}
{{ config('app.name') }} +

+ + + @if (isset($actionText)) + + + + +
+

+ {{ __('If you\'re having trouble clicking the "{0}" button, copy and paste the URL below into your web browser:', $actionText) }} +

+ +

+ + {{ $actionUrl }} + +

+
+ @endif +
+
+ + + + +
+

+ © {{ date('Y') }} + {{ Config::get('app.name') }}. + All rights reserved. +

+
+
+
+ + diff --git a/app/Views/Emails/Notifications/Plain.tpl b/app/Views/Emails/Notifications/Plain.tpl new file mode 100644 index 00000000..bf7552b2 --- /dev/null +++ b/app/Views/Emails/Notifications/Plain.tpl @@ -0,0 +1,37 @@ +', '
'), array($line, "\n"), $value)); + + }, $introLines); + + echo implode("\n", $lines), "\n\n"; +} + +if (isset($actionText)) { + echo "{$actionText}: {$actionUrl}", "\n\n"; +} + +if (! empty($outroLines)) { + $lines = array_map(function ($value) use ($line) + { + return strip_tags(str_replace(array('
', '
'), array($line, "\n"), $value)); + + }, $outroLines); + + echo implode("\n", $lines), "\n\n"; +} + +echo __('Regards,'), "\n"; + +echo config('app.name'), "\n"; diff --git a/app/Views/Errors/400.php b/app/Views/Errors/400.php index 7ea5b9d0..d69470ed 100644 --- a/app/Views/Errors/400.php +++ b/app/Views/Errors/400.php @@ -4,10 +4,12 @@

400

+ +
-

Bad Request

-

This could be the result of a invalid Page request.

+

+

diff --git a/app/Views/Errors/403.php b/app/Views/Errors/403.php index e80aa174..b7c9c414 100644 --- a/app/Views/Errors/403.php +++ b/app/Views/Errors/403.php @@ -6,8 +6,8 @@
-

Forbidded

-

This could be the result of a invalid Page request.

+

+

diff --git a/app/Views/Errors/404.php b/app/Views/Errors/404.php index 8d123f79..ab7801c2 100644 --- a/app/Views/Errors/404.php +++ b/app/Views/Errors/404.php @@ -1,20 +1,20 @@
-
-
+
+
-

404

+

404

-
+
-

The page you were looking for could not be found

-

This could be the result of the page being removed, the name being changed or the page being temporarily unavailable

-

Troubleshooting

+

+

+

-
    -
  • If you spelled the URL manually, double check the spelling
  • -
  • Go to our website's home page, and navigate to the content in question
  • -
+
    +
  • +
  • +
-
-
+
+
diff --git a/app/Views/Errors/503.php b/app/Views/Errors/503.php index d21698a8..84fd1a25 100644 --- a/app/Views/Errors/503.php +++ b/app/Views/Errors/503.php @@ -7,7 +7,7 @@

-

+

diff --git a/app/Views/Layouts/Default.php b/app/Views/Layouts/Default.php deleted file mode 100644 index 738f62a8..00000000 --- a/app/Views/Layouts/Default.php +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - <?= isset($title) ? $title : 'Page'; ?> - <?= Config::get('app.name'); ?> - - - - - - - - - -
- -
- - - - - - - - - - diff --git a/app/Views/Layouts/Default.tpl b/app/Views/Layouts/Default.tpl new file mode 100644 index 00000000..27e9cb6c --- /dev/null +++ b/app/Views/Layouts/Default.tpl @@ -0,0 +1,37 @@ + + + + + + {{ $title or 'Page' }} - {{ Config::get('app.name'); }} + + @assets('css', array( + 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css', + 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css', + 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', + resource_url('css/bootstrap-xl-mod.min.css'), + resource_url('css/style.css'), + )) + + + + +
+ +@section('content') + {{ $content }} +@show + +
+ +@section('footer') + +@show + +@assets('js', array( + 'https://code.jquery.com/jquery-1.12.4.min.js', + 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js' +)) + + + diff --git a/app/Views/Layouts/Static.php b/app/Views/Layouts/Static.php deleted file mode 100644 index 3c769bfd..00000000 --- a/app/Views/Layouts/Static.php +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - <?= isset($title) ? $title : 'Page'; ?> - <?= Config::get('app.name'); ?> - - - - - - - - - -
-
- <?= Config::get('app.name') ?> -

-
-
- -
- - - - - - - - - - diff --git a/app/Views/Layouts/Static.tpl b/app/Views/Layouts/Static.tpl new file mode 100644 index 00000000..c6a3ce05 --- /dev/null +++ b/app/Views/Layouts/Static.tpl @@ -0,0 +1,31 @@ +@extends('Layouts/Default') + +@section('content') +
+ <?= Config::get('app.name') ?> + @if ($title) +

{{ ($title !== 'Home') ? $title : ''; }}

+ @endif +
+
+ +{{ $content; }} + +@stop + +@section('footer') + +@stop diff --git a/app/Views/Pages/Home.php b/app/Views/Pages/Home.php index 398d6999..daec907a 100644 --- a/app/Views/Pages/Home.php +++ b/app/Views/Pages/Home.php @@ -2,14 +2,14 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -if (Config::get('app.debug') !== true): - throw new NotFoundException('Please replace app/Views/Pages/Home.php with your own version.'); -endif; +if (Config::get('app.debug') !== true) { + throw new NotFoundHttpException('Please replace app/Views/Pages/Home.php with your own version.'); +} ?>
-

Welcome to Nova

+

Welcome to Nova Framework


@@ -91,5 +91,6 @@
  • Your compiled views directory is NOT writable.
  • +
    diff --git a/app/Views/Partials/Messages.php b/app/Views/Partials/Messages.php deleted file mode 100644 index 3d9acfa9..00000000 --- a/app/Views/Partials/Messages.php +++ /dev/null @@ -1,27 +0,0 @@ - - - -
    -
    - - -
    -
    - - - - -any()) { ?> - -
    -
    - -
      - all('
    • :message
    • ') as $error) { ?> - - -
    -
    -
    - - diff --git a/app/Views/Partials/Messages.tpl b/app/Views/Partials/Messages.tpl new file mode 100644 index 00000000..c27fa592 --- /dev/null +++ b/app/Views/Partials/Messages.tpl @@ -0,0 +1,19 @@ +@foreach (array('success', 'warning', 'danger') as $type) + @if (Session::has($type)) +
    + + {{ Session::get($type); }} +
    + @endif +@endforeach + +@if ($errors->any()) +
    + + +
    +@endif diff --git a/app/Views/Static.tpl b/app/Views/Static.tpl new file mode 100644 index 00000000..6ef72537 --- /dev/null +++ b/app/Views/Static.tpl @@ -0,0 +1,4 @@ +
    +
    {{ $content }}
    +
    {{ $sidebar }}
    +
    diff --git a/assets/css/bootstrap-xl-mod.css b/assets/css/bootstrap-xl-mod.css new file mode 100644 index 00000000..e481eec2 --- /dev/null +++ b/assets/css/bootstrap-xl-mod.css @@ -0,0 +1,261 @@ +/* Bootstrap 3 XL mod */ + +@media (min-width: 1200px) and (max-width: 1479px) { + .hidden-lg { + display: none !important; + } +} + +.visible-xl-block, .visible-xl-inline, .visible-xl-inline-block, .visible-xl { + display: none !important; +} + +@media (min-width: 1480px) { + .container { + width: 1400px; + } + + .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 { + float: left; + min-height: 1px; + padding-left: 15px; + padding-right: 15px; + position: relative; + } + + .col-xl-12 { + width: 100%; + } + + .col-xl-11 { + width: 91.6667%; + } + + .col-xl-10 { + width: 83.3333%; + } + + .col-xl-9 { + width: 75%; + } + + .col-xl-8 { + width: 66.6667%; + } + + .col-xl-7 { + width: 58.3333%; + } + + .col-xl-6 { + width: 50%; + } + + .col-xl-5 { + width: 41.6667%; + } + + .col-xl-4 { + width: 33.3333%; + } + + .col-xl-3 { + width: 25%; + } + + .col-xl-2 { + width: 16.6667%; + } + + .col-xl-1 { + width: 8.33333%; + } + + .col-xl-pull-12 { + right: 100%; + } + + .col-xl-pull-11 { + right: 91.6667%; + } + + .col-xl-pull-10 { + right: 83.3333%; + } + + .col-xl-pull-9 { + right: 75%; + } + + .col-xl-pull-8 { + right: 66.6667%; + } + + .col-xl-pull-7 { + right: 58.3333%; + } + + .col-xl-pull-6 { + right: 50%; + } + + .col-xl-pull-5 { + right: 41.6667%; + } + + .col-xl-pull-4 { + right: 33.3333%; + } + + .col-xl-pull-3 { + right: 25%; + } + + .col-xl-pull-2 { + right: 16.6667%; + } + + .col-xl-pull-1 { + right: 8.33333%; + } + + .col-xl-pull-0 { + right: auto; + } + + .col-xl-push-12 { + left: 100%; + } + + .col-xl-push-11 { + left: 91.6667%; + } + + .col-xl-push-10 { + left: 83.3333%; + } + + .col-xl-push-9 { + left: 75%; + } + + .col-xl-push-8 { + left: 66.6667%; + } + + .col-xl-push-7 { + left: 58.3333%; + } + + .col-xl-push-6 { + left: 50%; + } + + .col-xl-push-5 { + left: 41.6667%; + } + + .col-xl-push-4 { + left: 33.3333%; + } + + .col-xl-push-3 { + left: 25%; + } + + .col-xl-push-2 { + left: 16.6667%; + } + + .col-xl-push-1 { + left: 8.33333%; + } + + .col-xl-push-0 { + left: auto; + } + + .col-xl-offset-12 { + margin-left: 100%; + } + + .col-xl-offset-11 { + margin-left: 91.6667%; + } + + .col-xl-offset-10 { + margin-left: 83.3333%; + } + + .col-xl-offset-9 { + margin-left: 75%; + } + + .col-xl-offset-8 { + margin-left: 66.6667%; + } + + .col-xl-offset-7 { + margin-left: 58.3333%; + } + + .col-xl-offset-6 { + margin-left: 50%; + } + + .col-xl-offset-5 { + margin-left: 41.6667%; + } + + .col-xl-offset-4 { + margin-left: 33.3333%; + } + + .col-xl-offset-3 { + margin-left: 25%; + } + + .col-xl-offset-2 { + margin-left: 16.6667%; + } + + .col-xl-offset-1 { + margin-left: 8.33333%; + } + + .col-xl-offset-0 { + margin-left: 0; + } + + .visible-xl { + display: block !important; + } + + table.visible-xl { + display: table; + } + + tr.visible-xl { + display: table-row !important; + } + + th.visible-xl, td.visible-xl { + display: table-cell !important; + } + + .visible-xl-block { + display: block !important; + } + + .visible-xl-inline { + display: inline !important; + } + + .visible-xl-inline-block { + display: inline-block !important; + } + + .hidden-xl { + display: none !important; + } +} diff --git a/assets/css/bootstrap-xl-mod.min.css b/assets/css/bootstrap-xl-mod.min.css new file mode 100644 index 00000000..b816fa7a --- /dev/null +++ b/assets/css/bootstrap-xl-mod.min.css @@ -0,0 +1 @@ +@media (min-width: 1200px) and (max-width: 1479px) {.hidden-lg{display:none!important;}}.visible-xl-block,.visible-xl-inline,.visible-xl-inline-block,.visible-xl{display:none!important;}@media (min-width: 1480px) {.container{width:1400px;}.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px;float:left;}.col-xl-12{width:100%;}.col-xl-11{width:91.66666667%;}.col-xl-10{width:83.33333333%;}.col-xl-9{width:75%;}.col-xl-8{width:66.66666667%;}.col-xl-7{width:58.33333333%;}.col-xl-6{width:50%;}.col-xl-5{width:41.66666667%;}.col-xl-4{width:33.33333333%;}.col-xl-3{width:25%;}.col-xl-2{width:16.66666667%;}.col-xl-1{width:8.33333333%;}.col-xl-pull-12{right:100%;}.col-xl-pull-11{right:91.66666667%;}.col-xl-pull-10{right:83.33333333%;}.col-xl-pull-9{right:75%;}.col-xl-pull-8{right:66.66666667%;}.col-xl-pull-7{right:58.33333333%;}.col-xl-pull-6{right:50%;}.col-xl-pull-5{right:41.66666667%;}.col-xl-pull-4{right:33.33333333%;}.col-xl-pull-3{right:25%;}.col-xl-pull-2{right:16.66666667%;}.col-xl-pull-1{right:8.33333333%;}.col-xl-pull-0{right:auto;}.col-xl-push-12{left:100%;}.col-xl-push-11{left:91.66666667%;}.col-xl-push-10{left:83.33333333%;}.col-xl-push-9{left:75%;}.col-xl-push-8{left:66.66666667%;}.col-xl-push-7{left:58.33333333%;}.col-xl-push-6{left:50%;}.col-xl-push-5{left:41.66666667%;}.col-xl-push-4{left:33.33333333%;}.col-xl-push-3{left:25%;}.col-xl-push-2{left:16.66666667%;}.col-xl-push-1{left:8.33333333%;}.col-xl-push-0{left:auto;}.col-xl-offset-12{margin-left:100%;}.col-xl-offset-11{margin-left:91.66666667%;}.col-xl-offset-10{margin-left:83.33333333%;}.col-xl-offset-9{margin-left:75%;}.col-xl-offset-8{margin-left:66.66666667%;}.col-xl-offset-7{margin-left:58.33333333%;}.col-xl-offset-6{margin-left:50%;}.col-xl-offset-5{margin-left:41.66666667%;}.col-xl-offset-4{margin-left:33.33333333%;}.col-xl-offset-3{margin-left:25%;}.col-xl-offset-2{margin-left:16.66666667%;}.col-xl-offset-1{margin-left:8.33333333%;}.col-xl-offset-0{margin-left:0;}.visible-xl{display:block!important;}table.visible-xl{display:table;}tr.visible-xl{display:table-row!important;}th.visible-xl,td.visible-xl{display:table-cell!important;}.visible-xl-block{display:block!important;}.visible-xl-inline{display:inline!important;}.visible-xl-inline-block{display:inline-block!important;}.hidden-xl{display:none!important;}} \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index d9b5b3b4..4b4361ab 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1,29 +1,18 @@ /* Your styles here */ -@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic); - html { position: relative; min-height: 100%; } body { - font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-weight: 400; - overflow-x: hidden; - overflow-y: auto; - /* Margin bottom by footer height */ - margin-bottom: 70px; - padding-top: 70px; -} - -h1, h2, h3, h4, h5, h6 { - font-family: 'Source Sans Pro', sans-serif; + margin-bottom: 60px; + padding-top: 60px; } #url-rewriting-warning { - display: none; + display: none; } .footer { diff --git a/assets/images/users/no-image.png b/assets/images/users/no-image.png deleted file mode 100644 index 49d4b9254d33508c9f709aafa136840d9ced90de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8007 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 JPDHLkV1f&~Y-|7k diff --git a/composer.json b/composer.json index 6e4cf05e..890cc6a2 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,14 @@ { - "name": "nova-framework/app", + "name": "nova-framework/framework", "type": "project", "description": "Framework for PHP 5.6+", - "homepage": "https://github.com/nova-framework/bare-app", + "homepage": "https://github.com/nova-framework/framework", "license": "MIT", "authors": [ { "name": "David Carr", "email": "dave@daveismyname.com", - "homepage": "http://daveismyname.com", + "homepage": "http://daveismyname.blog", "role": "Co-author" }, { @@ -21,7 +21,7 @@ "repositories": [ { "type": "git", - "url": "https://github.com/nova-framework/plugin-installer" + "url": "https://github.com/nova-framework/package-installer" }, { "type": "git", @@ -30,9 +30,8 @@ ], "require": { "php": ">=5.6.0", - "nova-framework/plugin-installer": "*", - "nova-framework/system": "~4.0", - "ramsey/uuid": "~3.0" + "nova-framework/package-installer": "*", + "nova-framework/system": "^3.0" }, "require-dev": { "fzaninotto/faker": "^1.6" @@ -43,22 +42,30 @@ "app/Database/Seeds" ], "psr-4": { - "App\\": "app/" - } + "App\\": "app/", + "Modules\\": "modules/", + "Themes\\": "themes/", + "Shared\\": "shared/" + }, + "files": [ + "shared/Support/helpers.php" + ] }, "scripts": { "post-install-cmd": [ - "php forge optimize" + "php forge optimize", + "php forge package:optimize" ], "post-update-cmd": [ "php forge clear-compiled", - "php forge optimize" + "php forge optimize", + "php forge package:optimize" ], "post-create-project-cmd": [ "php forge key:generate" ], "post-autoload-dump": [ - "Nova\\Composer\\Installer\\PluginInstaller::postAutoloadDump" + "Nova\\Composer\\Installer\\PackageInstaller::postAutoloadDump" ] }, "prefer-stable": true, diff --git a/forge b/forge index ca7ee57b..d0f74222 100755 --- a/forge +++ b/forge @@ -8,9 +8,10 @@ defined('DS') || define('DS', DIRECTORY_SEPARATOR); /** Define the absolute paths for configured directories. */ -define('BASEPATH', realpath(dirname(__FILE__)) .DS); +define('BASEPATH', realpath(__DIR__) .DS); define('APPPATH', BASEPATH .'app' .DS); + define('WEBPATH', BASEPATH .'webroot' .DS); //-------------------------------------------------------------------------- @@ -23,15 +24,24 @@ require BASEPATH .'vendor' .DS .'autoload.php'; // Turn On The Lights //-------------------------------------------------------------------------- -$app = require_once APPPATH .'Start.php'; +$app = require_once APPPATH .'Platform' .DS .'Start.php'; //-------------------------------------------------------------------------- -// Run The Forge Application +// Load The Forge Console Application //-------------------------------------------------------------------------- -$kernel = $app->make('Nova\Console\Contracts\KernelInterface'); +use Nova\Console\Application as ConsoleApplication; + + +$app->setRequestForConsoleEnvironment(); + +$forge = ConsoleApplication::start($app); + +//-------------------------------------------------------------------------- +// Run The Forge Application +//-------------------------------------------------------------------------- -$status = $kernel->handle( +$status = $forge->handle( $input = new Symfony\Component\Console\Input\ArgvInput, new Symfony\Component\Console\Output\ConsoleOutput ); @@ -40,6 +50,6 @@ $status = $kernel->handle( // Shutdown The Application //-------------------------------------------------------------------------- -$kernel->terminate($input, $status); +$app->terminate(); exit($status); diff --git a/app/Listeners/.gitkeep b/modules/.gitkeep similarity index 100% rename from app/Listeners/.gitkeep rename to modules/.gitkeep diff --git a/plugins/.htaccess b/plugins/.htaccess deleted file mode 100644 index 14249c50..00000000 --- a/plugins/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/scripts/.htaccess b/scripts/.htaccess deleted file mode 100644 index 14249c50..00000000 --- a/scripts/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/server.php b/server.php index d798b7ad..87917f8d 100644 --- a/server.php +++ b/server.php @@ -6,18 +6,17 @@ // Usage: // php -S localhost:8080 -t webroot/ server.php -defined('DS') || define('DS', DIRECTORY_SEPARATOR); -$path = dirname(__FILE__) .DS .'webroot'; +$publicPath = 'webroot/'; $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); $uri = urldecode($uri); -$requested = $path .DS .$uri; +$requested = $publicPath .$uri; if (($uri !== '/') && file_exists($requested)) { return false; } -require_once $path .DS .'index.php'; +require_once $publicPath .'index.php'; diff --git a/shared/Language/CS/messages.php b/shared/Language/CS/messages.php new file mode 100644 index 00000000..4e88d47a --- /dev/null +++ b/shared/Language/CS/messages.php @@ -0,0 +1,4 @@ + $filePath) { $file = substr($filePath, strlen(BASEPATH)); + if($workPath == 'app') { + $testPath = substr($filePath, strlen(BASEPATH)); + + if(starts_with($testPath, 'app/Modules') || starts_with($testPath, 'app/Themes')) { + continue; + } + } + $content = file_get_contents($filePath); if(preg_match_all($pattern, $content, $matches)) { @@ -152,6 +195,8 @@ function phpGrep($q, $path) { return " .var_export($messages, true).";\n"; + //$output = preg_replace("/^ {2}(.*)$/m"," $1", $output); + file_put_contents($langFile, $output); echo 'Written the Language file: "'.str_replace(BASEPATH, '', $langFile).'"'.PHP_EOL; diff --git a/webroot/.gitignore b/webroot/.gitignore deleted file mode 100644 index 23053de0..00000000 --- a/webroot/.gitignore +++ /dev/null @@ -1 +0,0 @@ -packages/ diff --git a/webroot/index.php b/webroot/index.php index 75503804..71bb97f8 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -2,21 +2,15 @@ defined('DS') || define('DS', DIRECTORY_SEPARATOR); -//-------------------------------------------------------------------------- -// Set The Framework Starting Time -//-------------------------------------------------------------------------- - -define('FRAMEWORK_START', microtime(true)); - //-------------------------------------------------------------------------- // Define the absolute paths for Application directories //-------------------------------------------------------------------------- -define('BASEPATH', realpath(__DIR__ .'/../') .DS); +define('BASEPATH', realpath(__DIR__.'/../') .DS); -define('WEBPATH', realpath(__DIR__) .DS); +define('APPPATH', realpath(__DIR__.'/../app/') .DS); -define('APPPATH', BASEPATH .'app' .DS); +define('WEBPATH', realpath(__DIR__) .DS); //-------------------------------------------------------------------------- // Load the Composer Autoloader @@ -28,21 +22,10 @@ // Bootstrap the Framework and get the Application instance //-------------------------------------------------------------------------- -$app = require_once APPPATH .'Start.php'; +$app = require_once APPPATH .'Platform' .DS .'Start.php'; //-------------------------------------------------------------------------- // Run the Application //-------------------------------------------------------------------------- -use Nova\Http\Request; - - -$kernel = $app->make('Nova\Http\Contracts\KernelInterface'); - -$response = $kernel->handle( - $request = Request::capture() -); - -$response->send(); - -$kernel->terminate($request, $response); +$app->run();