Skip to content

Commit d9fac04

Browse files
authored
Merge pull request #51 from AlexStack/alex_dev
Test Laravel 8.x
2 parents a0c5aca + 6c1292b commit d9fac04

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
[![image](docs/images/min/styleci.svg)](https://github.com/AlexStack/Laravel-CMS/releases)
66
[![Latest Stable Version](https://poser.pugx.org/alexstack/laravel-cms/v/stable)](https://github.com/AlexStack/Laravel-CMS/releases)
77

8-
- Free, open-source Simple Bootstrap Laravel CMS for any EXISTING Laravel 7.x or 6.x or old Laravel 5.x website.
8+
- Free, open-source Simple Bootstrap Laravel CMS, support Laravel 8.x or 7.x or old Laravel 6.x & 5.x
9+
- Can integrate with any existing Laravel project, install as an individual Laravel package
910
- Only add a few database tables with a prefix, not effect your existing database tables.
1011
- You can easily custom the database table names, the page URL path(route) and the template(theme)
11-
- Website is ready after install. Easy to use, simple enough but flexible.
12-
- Basic Laravel 7.x /Laravel 6.x / Laravel 5.x syntax and blade template, no need to learn a new "language"
12+
- Build-in Website is ready after install. Easy to use, simple enough but flexible.
13+
- Basic Laravel 8.x/ Laravel 7.x /Laravel 6.x / Laravel 5.x syntax and blade template, no need to learn a "new language"
1314

14-
## How to install & uninstall (Support Laravel 7.x & Laravel 6.x & Laravel 5.x)
15+
## How to install & uninstall (Support Laravel 8.x & Laravel 7.x & Laravel 6.x & Laravel 5.x)
1516

1617
```php
1718
// Make sure you already configured the database in the .env
@@ -58,7 +59,7 @@ php artisan laravelcms --action=uninstall
5859
- Can be fixed by the below commands:
5960

6061
```php
61-
// Laravel 6.x & Laravel >= 7
62+
// Laravel 6.x & Laravel >= 7 & Laravel >= 8
6263
composer require laravel/ui && php artisan ui vue --auth
6364
// Laravel 5.x, run blow command instead
6465
php artisan make:auth && php artisan migrate
@@ -190,7 +191,7 @@ php artisan laravelcms --action=clear
190191
- It's good for a local test
191192

192193
```php
193-
// Install Laravel 6.x/7.x & the CMS package
194+
// Install Laravel 6.x/7.x/8.x & the CMS package
194195
composer create-project --prefer-dist laravel/laravel cms && cd cms && composer require alexstack/laravel-cms
195196

196197
// Then you need to change the database settings in the .env after that initialize CMS
@@ -200,7 +201,7 @@ php artisan laravelcms
200201
// Or initialize the CMS with silent mode
201202
php artisan laravelcms --action=initialize --locale=en --table_prefix=cms_  --silent=yes
202203

203-
// Enable auth system for Laravel 6.x/7.x
204+
// Enable auth system for Laravel 6.x/7.x/8.x
204205
composer require laravel/ui && php artisan ui vue --auth && php artisan migrate
205206

206207
// Config the document root to point to the cms/public then you can access the backend

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "alexstack/laravel-cms",
3-
"description": "Simple Bootstrap Laravel CMS for any EXISTING or new Laravel website. Only add few database tables with prefix, not effect your existing database tables. Support Laravel 7 & Laravel 6 & Laravel 5. Amila Laravel CMS",
3+
"description": "Simple Bootstrap Laravel CMS. Can integrate to any existing Laravel project. Only add few database tables with prefix, not effect your existing database tables. Support Laravel 7.x & Laravel 6.x & Laravel 5.x - Amila Laravel CMS",
44
"type": "library",
55
"homepage": "https://github.com/AlexStack/Laravel-CMS/",
66
"keywords": ["laravel", "laravel cms", "laravel blog", "laravel wordpress", "LaravelCMS", "amila laravel cms", "php cms", "cms", "laravel 6", "laravel6", "laravel 7", "laravel7", "Amila CMS", "headless cms", "existing laravel project"],

src/database/migrations/2019_08_16_075528_add_foreign_keys_to_cms_pages_table.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ public function up()
2323
$table_name_files = $this->config['table_name']['files'];
2424
$table_name_pages = $this->table_name;
2525

26-
$table->foreign('main_image', 'cms_pages_ibfk_main_image')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
27-
$table->foreign('main_banner', 'cms_pages_ibfk_main_banner')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
28-
$table->foreign('extra_image_1', 'cms_pages_ibfk_extra_image_1')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
29-
$table->foreign('extra_image_2', 'cms_pages_ibfk_extra_image_2')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
30-
$table->foreign('extra_image_3', 'cms_pages_ibfk_extra_image_3')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
31-
$table->foreign('parent_id', 'cms_pages_ibfk_parent_id')->references('id')->on($table_name_pages)->onUpdate('RESTRICT')->onDelete('SET NULL');
32-
//$table->foreign('user_id', 'cms_pages_ibfk_user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('SET NULL');
26+
$table->foreign('main_image', $this->table_name.'_ibfk_main_image')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
27+
$table->foreign('main_banner', $this->table_name.'_ibfk_main_banner')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
28+
$table->foreign('extra_image_1', $this->table_name.'_ibfk_extra_image_1')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
29+
$table->foreign('extra_image_2', $this->table_name.'_ibfk_extra_image_2')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
30+
$table->foreign('extra_image_3', $this->table_name.'_ibfk_extra_image_3')->references('id')->on($table_name_files)->onUpdate('RESTRICT')->onDelete('SET NULL');
31+
$table->foreign('parent_id', $this->table_name.'_ibfk_parent_id')->references('id')->on($table_name_pages)->onUpdate('RESTRICT')->onDelete('SET NULL');
32+
//$table->foreign('user_id', $this->table_name . '_ibfk_user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('SET NULL');
3333
});
3434
}
3535

@@ -39,12 +39,12 @@ public function up()
3939
public function down()
4040
{
4141
Schema::table($this->table_name, function (Blueprint $table) {
42-
$table->dropForeign('cms_pages_ibfk_main_image');
43-
$table->dropForeign('cms_pages_ibfk_main_banner');
44-
$table->dropForeign('cms_pages_ibfk_extra_image_1');
45-
$table->dropForeign('cms_pages_ibfk_extra_image_2');
46-
$table->dropForeign('cms_pages_ibfk_extra_image_3');
47-
//$table->dropForeign('cms_pages_ibfk_user_id');
42+
$table->dropForeign($this->table_name.'_ibfk_main_image');
43+
$table->dropForeign($this->table_name.'_ibfk_main_banner');
44+
$table->dropForeign($this->table_name.'_ibfk_extra_image_1');
45+
$table->dropForeign($this->table_name.'_ibfk_extra_image_2');
46+
$table->dropForeign($this->table_name.'_ibfk_extra_image_3');
47+
//$table->dropForeign($this->table_name . '_ibfk_user_id');
4848
});
4949
}
5050
}

src/resources/views/backend/file-list.blade.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ class="preview_link not_image icon" title="{{$file->filename}}">
142142
title="{{$file->filename}}" class="preview_link not_image">{{strtoupper($file->suffix)}}
143143
{{$helper->t('file')}}<i class="fas fa-external-link-alt ml-1 small text-secondary"></i></a>
144144
{{($file->filesize/1024 > 1000) ? round($file->filesize/1024/1024,2) . ' MB' : (($file->filesize/1024 > 10) ? round($file->filesize/1024) . ' KB' : round($file->filesize/1024, 1) . ' KB') }}
145-
146145
<a href="#" onclick="return confirmDelete({{$file->id}})" class="del">D<i
147146
class="far fa-trash-alt ml-1 small text-secondary"></i></a>
148147
</div>

0 commit comments

Comments
 (0)