Skip to content

Commit

Permalink
More 2.0 docs adjustements
Browse files Browse the repository at this point in the history
  • Loading branch information
ifox committed Mar 4, 2020
1 parent e3d89bc commit e39e029
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 30 deletions.
8 changes: 4 additions & 4 deletions docs/.sections/crud-modules.md
Expand Up @@ -66,7 +66,7 @@ Generated migrations are regular Laravel migrations. A few helpers are available

// main table, holds all non translated fields
Schema::create('table_name_plural', function (Blueprint $table) {
createDefaultTableFields($table)
createDefaultTableFields($table);
// will add the following inscructions to your migration file
// $table->increments('id');
// $table->softDeletes();
Expand All @@ -76,7 +76,7 @@ Schema::create('table_name_plural', function (Blueprint $table) {

// translation table, holds translated fields
Schema::create('table_name_singular_translations', function (Blueprint $table) {
createDefaultTranslationsTableFields($table, 'tableNameSingular')
createDefaultTranslationsTableFields($table, 'tableNameSingular');
// will add the following inscructions to your migration file
// createDefaultTableFields($table);
// $table->string('locale', 6)->index();
Expand All @@ -88,7 +88,7 @@ Schema::create('table_name_singular_translations', function (Blueprint $table) {

// slugs table, holds slugs history
Schema::create('table_name_singular_slugs', function (Blueprint $table) {
createDefaultSlugsTableFields($table, 'tableNameSingular')
createDefaultSlugsTableFields($table, 'tableNameSingular');
// will add the following inscructions to your migration file
// createDefaultTableFields($table);
// $table->string('slug');
Expand All @@ -113,7 +113,7 @@ Schema::create('table_name_singular_revisions', function (Blueprint $table) {

// related content table, holds many to many association between 2 tables
Schema::create('table_name_singular1_table_name_singular2', function (Blueprint $table) {
createDefaultRelationshipTableFields($table, $table1NameSingular, $table2NameSingular)
createDefaultRelationshipTableFields($table, $table1NameSingular, $table2NameSingular);
// will add the following inscructions to your migration file
// $table->integer("{$table1NameSingular}_id")->unsigned();
// $table->foreign("{$table1NameSingular}_id")->references('id')->on($table1NamePlural)->onDelete('cascade');
Expand Down
35 changes: 14 additions & 21 deletions docs/.sections/getting-started/configuration.md
Expand Up @@ -70,6 +70,14 @@ Twill's users and their password resets are stored in `twill_users` and `twill_p
return [
'users_table' => 'twill_users',
'password_resets_table' => 'twill_password_resets',
'blocks_table' => 'blocks',
'features_table' => 'features',
'settings_table' => 'settings',
'medias_table' => 'medias',
'mediables_table' => 'mediables',
'files_table' => 'files',
'fileables_table' => 'fileables',
'related_table' => 'related',
];
```

Expand Down Expand Up @@ -347,27 +355,6 @@ See the [file library's documentation](#file-library-2) for more information.

The `allowed_extensions` configuration option is an array of file extensions that Twill's file library uploader will accept. By default, it is empty, all extensions are allowed.

#### Debug

The [Laravel Debug Bar](https://github.com/barryvdh/laravel-debugbar) and [Inspector](https://github.com/lsrur/inspector) packages are installed and registered by Twill, except on production environments.

On `development`, `local` and `staging` environment, Debug Bar is enabled by default. You can use Inspector instead by using the `DEBUG_USE_INSPECTOR` environment variable.

If you do not want to see the Debug Bar on the frontend of your Laravel application but want to keep it in Twill's admin console while developing or on staging servers, use the `DEBUG_BAR_IN_FE` environment variable:

```bash
DEBUG_BAR_IN_FE=false
```

And add the `noDebugBar` to your frontend route group middlewares.
Example in a default Laravel 5.7 application's `RouteServiceProvider`:

```php
Route::middleware('web', 'noDebugBar')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
```

### Navigation

The `config/twill-navigation.php` file manages the navigation of your custom admin console. Using Twill's UI, the package provides 3 levels of navigation: global, primary and secondary. This file simply contains a nested array description of your navigation.
Expand All @@ -383,6 +370,10 @@ Example:
<?php

return [
'pages' => [
'title' => 'Pages',
'module' => true,
],
'work' => [
'title' => 'Work',
'route' => 'admin.work.projects.index',
Expand Down Expand Up @@ -413,6 +404,8 @@ To make it work properly and to get active states automatically in Twill's UI, y
```php
<?php

Route::module('pages');

Route::group(['prefix' => 'work'], function () {
Route::module('projects');
Route::module('clients');
Expand Down
6 changes: 3 additions & 3 deletions docs/.sections/getting-started/environment-requirements.md
@@ -1,9 +1,9 @@
### Environment requirements
Twill is compatible with Laravel `5.6`, `5.7`, `5.8` and above applications running on PHP 7.1 and above.
Twill is compatible with Laravel `5.6`, `5.7`, `5.8` and `6` applications running on PHP 7.1 and above.

As a dependency to your own application, Twill shares Laravel's [server requirements](https://laravel.com/docs/5.6/installation#server-requirements), which are satisfied by both [Homestead](https://laravel.com/docs/5.6/homestead) and [Valet](https://laravel.com/docs/5.6/valet) during development, and easily deployed to production using [Forge](https://forge.laravel.com) and [Envoyer](https://envoyer.io) or [Envoy](https://laravel.com/docs/envoy), as well as any other Laravel compatible server configuration and deployment strategy.
As a dependency to your own application, Twill shares Laravel's [server requirements](https://laravel.com/docs/6.x/installation#server-requirements), which are satisfied by both [Homestead](https://laravel.com/docs/6.x/homestead) and [Valet](https://laravel.com/docs/6.x/valet) during development, and easily deployed to production using [Forge](https://forge.laravel.com) and [Envoyer](https://envoyer.io) or [Envoy](https://laravel.com/docs/envoy), as well as any other Laravel compatible server configuration and deployment strategy.

Twill uses Laravel Mix to build the frontend assets of its UI. To ensure reproducible builds, npm scripts provided by Twill use the [npm `ci`](https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable) command, which is available since npm `5.7`.
Twill uses Vue CLI to build the frontend assets of its UI. To ensure reproducible builds, npm scripts provided by Twill use the [npm `ci`](https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable) command, which is available since npm `5.7`.

Twill's database migrations create `json` columns. Your database should support the `json` type. Twill has been developed and tested against MySQL (`>=5.7`) and PostgreSQL(`>=9.3`).

Expand Down
4 changes: 2 additions & 2 deletions docs/.sections/resources.md
Expand Up @@ -9,7 +9,7 @@
- [jenssegers/rollbar](https://github.com/jenssegers/laravel-rollbar) adds a listener to Laravel's logging component to work with Rollbar.
- [sentry/sentry-laravel](https://github.com/getsentry/sentry-laravel) is a Laravel integration for Sentry.
- [arcanedev/log-viewer](https://github.com/ARCANEDEV/LogViewer) allows you to manage and keep track of each one of your logs files in a nice web UI.
- [roumen/sitemap](https://github.com/RoumenDamianoff/laravel-sitemap) is a very complelete sitemap generator.
- [laravelium/sitemap](https://gitlab.com/Laravelium/Sitemap) is a very complelete sitemap generator.
- [flynsarmy/csv-seeder](https://github.com/Flynsarmy/laravel-csv-seeder) allows CSV based database seeds.
- [ufirst/lang-import-export](https://github.com/ufirstgroup/laravel-lang-import-export) provides artisan commands to import and export language files from and to CSV
- [nikaia/translation-sheet](https://github.com/nikaia/translation-sheet) allows translating Laravel languages files using a Google Spreadsheet.
- [nikaia/translation-sheet](https://github.com/nikaia/translation-sheet) allows translating Laravel languages files using a Google Spreadsheet.

0 comments on commit e39e029

Please sign in to comment.