Replies: 2 comments 2 replies
-
Hi @vbulash. Yes, this is possible. You will need a local DB server and possibly to configure your add to file: /etc/hosts
update file: .env
then run:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry, seems not working.
Of course, php artisan twill:install made before all steps.
Then step:
/etc/hosts:
127.0.0.1 neurolife.test
.env:
APP_NAME=Neurolife
APP_ENV=local
APP_KEY=base64:...
APP_DEBUG=true
APP_URL=http://neurolife.test
# Twill
APP_PORT=8000
ADMIN_APP_URL="{$APP_URL}"
ADMIN_APP_PATH=admin
FILE_LIBRARY_ENDPOINT_TYPE=local
FILE_LIBRARY_LOCAL_PATH=uploads/
MEDIA_LIBRARY_ENDPOINT_TYPE=local
MEDIA_LIBRARY_LOCAL_PATH=uploads
MEDIA_LIBRARY_IMAGE_SERVICE=A17\Twill\Services\MediaLibrary\Glide
Start server:
php artisan serve —host=neurolife.test --port=8000
config/twill.php:
<?php
return [
'locale' => 'ru',
'fallback_locale' => 'en',
'enabled' => [
'users-management' => true,
'media-library' => true,
'file-library' => true,
'block-editor' => true,
'buckets' => true,
'users-image' => false,
'settings' => true,
'dashboard' => true,
'search' => true,
'users-description' => false,
'activitylog' => true,
'users-2fa' => false,
'users-oauth' => false,
],
];
Module ‘blog’ added by artisan.
config/twill-navigation.php:
<?php
return [
'blogs' => [
'title' => 'Блог',
'module' => true
]
];
resources/views/admin/blogs/form.blade.php:
@extends('twill::layouts.form')
@section('contentFields')
@formfield('input', [
'name' => 'title',
'label' => 'Заголовок',
'placeholder' => 'Введите заголовок статьи блога',
'maxlength' => 100
])
@formfield('wysiwyg', [
'name' => 'description',
'label' => 'Описние',
'toolbarOptions' => [
[ 'header' => [1, 2, false] ],
'clean', 'bold', 'link', 'italic', 'list-ordered', 'list-unordered', [
'indent' => '-1'], [ 'indent' => '+1' ]
],
'placeholder' => 'Введите описание статьи блога',
'maxlength' => 200,
'editSource' => true,
])
@Stop
That’s it.
Try open http://neurolife.test:8000 <http://neurolife.test:8000/> - ok, initial Laravel page
Try open http://admin.neurolife.test:8000 <http://admin.neurolife.test:8000/> or http://neurolife.test:8000/admin <http://neurolife.test:8000/admin> - 404 error.
So, twill not installed or not configured properly.
What’s up?
… 30 авг. 2021 г., в 15:52, Patrick Boivin ***@***.***> написал(а):
Hi @vbulash <https://github.com/vbulash>. Yes, this is possible. You will need a local DB server and possibly to configure your /etc/hosts. A quick example:
add to file: /etc/hosts
127.0.0.1 example.test
update file: .env
APP_PORT=8000
APP_URL=http://example.test
ADMIN_APP_URL=http://example.test
ADMIN_APP_PATH=admin
then run:
php artisan serve --host=example.test --port=8000
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1113 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACGIIIV5O2YK2TH5672NEGDT7N5ITANCNFSM5DBQ2SNQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to use Twill in local development environment - no Homestead / Vagrant, just internal PHP server (php artisan serve)
Beta Was this translation helpful? Give feedback.
All reactions