@@ -163,6 +163,63 @@ $ npm install
163163
164164```
165165
166+ ## Usage
167+
168+ ### Test
169+ ``` bash
170+ # test
171+ $ php vendor/bin/phpunit
172+ ```
173+
174+ ### If you need separate backend and frontend
175+
176+ ``` bash
177+ # back to laravel directory
178+ $ cd ../laravel
179+
180+ # start local server
181+ $ php artisan serve
182+
183+ $ cd ../coreui
184+
185+ $ npm run serve
186+ ```
187+ Open your browser with address: [ localhost:8080] ( localhost:8080 )
188+
189+ If you need change backend adress go to file /coreui/src/main.js
190+ And change line:
191+ ``` js
192+ Vue .prototype .$apiAdress = ' http://127.0.0.1:8000'
193+ ```
194+
195+ ### If you don't need separate backend and frontend
196+
197+ 1 . Go to file /laravel/routes/web.php
198+ And uncomment this lines:
199+ ``` php
200+ Route::get('/{any}', function () {
201+ return view('coreui.homepage');
202+ })->where('any', '.*');
203+ ```
204+ 2 . Go to file /laravel/config/filesystems.php
205+ And change this line:
206+ ``` php
207+ 'root' => public_path() . '/../../coreui/public/public',
208+ ```
209+ To this:
210+ ``` php
211+ 'root' => public_path('public'),
212+ ```
213+ 3 . Go to file /coreui/src/views/media/Media.vue
214+ And change this line:
215+ ``` js
216+ changePort: ' localhost:8080' ,
217+ ```
218+ To this:
219+ ``` js
220+ changePort: ' localhost:8000' ,
221+ ```
222+ 4 .
166223``` bash
167224# back to laravel directory
168225$ cd ../laravel
@@ -172,19 +229,14 @@ $ npm run dev
172229
173230# and repeat generate mixing
174231$ npm run dev
175- ```
176-
177- ## Usage
178232
179- ``` bash
180233# start local server
181234$ php artisan serve
182-
183- # test
184- $ php vendor/bin/phpunit
185235```
236+ Open your browser with address: [ localhost:8000] ( localhost:8000 )
237+
238+ ### When you have project open in browser
186239
187- Open your browser with address: [ localhost:8000] ( localhost:8000 )
188240Click "Login" on sidebar menu and log in with credentials:
189241
190242* E-mail: _ admin@admin.com _
0 commit comments