Skip to content

Commit 40f3513

Browse files
committed
t
1 parent 81f13e2 commit 40f3513

File tree

5 files changed

+60
-17
lines changed

5 files changed

+60
-17
lines changed

README.md

+11-14
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,30 @@
1010

1111
[Demo](https://www.onstory.fun/community)
1212

13-
[goto old version 2.x](./documents/5.x.md)
13+
[version 2.x installation](./documents/5.x.md)
14+
[version 8.1.x installation](./documents/8.1.x.md)
15+
16+
1417

1518

1619
## Installation
20+
> over ver 8.2
1721
```
1822
composer require wangta69/laravel_board
23+
php artisan bbs:install
1924
```
2025

21-
## Setup
26+
## resources
2227
- design : bootstrp 5.x
2328
- jquery : 3.6.x
2429

25-
### publish stuff
26-
```
27-
php artisan vendor:publish
28-
```
2930

30-
### create storage soft link
31-
```
32-
php artisan storage:link
31+
<!-- breeze install
3332
```
33+
composer require laravel/breeze:1.9.2 // 라라벨 8.x 일경우
34+
php artisan breeze:install
35+
``` -->
3436

35-
### publish all Resoucres
36-
```
37-
php artisan vendor:publish --provider="Pondol\Bbs\BbsServiceProvider"
38-
php artisan vendor:publish --provider="Pondol\Editor\EditorServiceProvider"
39-
```
4037

4138
## How to Use
4239
### Set Security for Admin.

documents/8.1.x.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 8.1.x
2+
3+
## Installation
4+
5+
6+
```
7+
composer require wangta69/laravel_board
8+
```
9+
10+
## Setup
11+
- design : bootstrp 5.x
12+
- jquery : 3.6.x
13+
14+
### publish stuff
15+
```
16+
php artisan vendor:publish
17+
```
18+
19+
### create storage soft link
20+
```
21+
php artisan storage:link
22+
```
23+
24+
### publish all Resoucres
25+
```
26+
php artisan vendor:publish --provider="Pondol\Bbs\BbsServiceProvider"
27+
php artisan vendor:publish --provider="Pondol\Editor\EditorServiceProvider"
28+
```

src/BbsServiceProvider.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ class BbsServiceProvider extends ServiceProvider {
2424
*/
2525
public function register()
2626
{
27+
28+
if ($this->app->runningInConsole()) {
29+
$this->commands([
30+
Console\InstallCommand::class,
31+
// Console\InstallCommand::class,
32+
]);
33+
}
34+
2735
// $this->app->bind('bbs', function($app) {
2836
$this->app->singleton('bbs', function($app) {
2937
return new Bbs;
@@ -54,7 +62,7 @@ public function boot()
5462

5563
$this->loadMigrationsFrom(__DIR__.'/migrations/');
5664
//$this->artisan('migrate');
57-
\Artisan::call('migrate');
65+
// \Artisan::call('migrate');
5866

5967
//if you use this one you have to command php artisan migrate
6068
//$this->publishes([

src/Console/InstallCommand.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Pondol\Bbs\Console;
44

55
use Illuminate\Console\Command;
6+
use Illuminate\Support\Facades\Schema;
67
// use Illuminate\Filesystem\Filesystem;
78
// use Illuminate\Support\Str;
89
// use Symfony\Component\Process\PhpExecutableFinder;
@@ -54,9 +55,18 @@ private function installLaravelEditor()
5455
'--force'=> true,
5556
'--provider' => 'Pondol\Bbs\BbsServiceProvider'
5657
]);
58+
59+
// users 테이블이 있는지 확인
60+
// $user_password = $this->ask('Password for administrator?');
61+
if (!Schema::hasTable('users')) {
62+
$this->info('no users table. Install laravel/breeze or other auth');
63+
};
64+
65+
\Artisan::call('migrate');
66+
5767
$this->info('The laravel board installed successfully.');
5868

59-
$this->comment('Please execute the "php artisan migrate" commands to build market database.');
69+
// $this->comment('Please execute the "php artisan migrate" commands to build market database.');
6070
}
6171

6272

src/resources/views/bbs/layouts/default.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@include ('bbs.layouts.partials.header')
1+
@include ('bbs::layouts.partials.header')
22
@yield ('styles')
33

44
<div class='container'>

0 commit comments

Comments
 (0)