Skip to content

Commit b7cef05

Browse files
committed
Merge branch 'v2-next'
2 parents 5f1a956 + 0b9f997 commit b7cef05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2259
-3256
lines changed

README.md

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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)
188240
Click "Login" on sidebar menu and log in with credentials:
189241

190242
* E-mail: _[email protected]_

coreui/package-lock.json

Lines changed: 1906 additions & 3137 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coreui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"core-js": "~3.6.4",
5353
"eslint": "~6.8.0",
5454
"eslint-plugin-vue": "~6.2.1",
55-
"node-sass": "~4.13.1",
55+
"node-sass": "~4.14.1",
5656
"npm-run-all": "~4.1.5",
5757
"sass-loader": "~8.0.2",
5858
"vue-template-compiler": "~2.6.11"

coreui/public/public/test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test

coreui/src/containers/Menu.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ export default {
113113
},
114114
mounted () {
115115
let self = this;
116-
axios.get( '/api/menu?token=' + localStorage.getItem("api_token") + '&menu=' + 'top_menu')
116+
console.log(this.$apiAdress)
117+
axios.get( this.$apiAdress + '/api/menu?token=' + localStorage.getItem("api_token") + '&menu=' + 'top_menu' )
117118
.then(function (response) {
118119
self.nav = self.rebuildData(response.data);
119120
}).catch(function (error) {

coreui/src/containers/TheHeaderDropdownAccnt.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default {
7777
methods:{
7878
logout(){
7979
let self = this;
80-
axios.post('/api/logout?token=' + localStorage.getItem("api_token"),{})
80+
axios.post(this.$apiAdress + '/api/logout?token=' + localStorage.getItem("api_token"),{})
8181
.then(function (response) {
8282
localStorage.setItem('roles', '');
8383
self.$router.push({ path: '/login' });

coreui/src/containers/TheSidebar.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ export default {
122122
this.show = sidebarClosed ? true : 'responsive'
123123
})
124124
let self = this;
125-
axios.get( '/api/menu?token=' + localStorage.getItem("api_token") )
125+
126+
console.log(this.$apiAdress);
127+
128+
axios.get( this.$apiAdress + '/api/menu?token=' + localStorage.getItem("api_token") )
126129
.then(function (response) {
127130
self.nav = self.rebuildData(response.data);
128131
}).catch(function (error) {

coreui/src/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import CoreuiVue from '@coreui/vue'
66
import { iconsSet as icons } from './assets/icons/icons.js'
77
import store from './store'
88

9+
Vue.prototype.$apiAdress = 'http://127.0.0.1:8000'
910
Vue.config.performance = true
1011
Vue.use(CoreuiVue)
1112

coreui/src/store.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const mutations = {
2121
}
2222
}
2323

24+
2425
export default new Vuex.Store({
2526
state,
2627
mutations

coreui/src/views/bread/Bread.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default {
5656
},
5757
mounted: function(){
5858
let self = this;
59-
axios.get( '/api/bread/' + self.$route.params.id + '?token=' + localStorage.getItem("api_token"))
59+
axios.get( this.$apiAdress + '/api/bread/' + self.$route.params.id + '?token=' + localStorage.getItem("api_token"))
6060
.then(function (response) {
6161
self.form = response.data.form
6262
self.formFields = response.data.formFields

0 commit comments

Comments
 (0)