bantenprov / vue-blog
Laravel blog content with vuejs support.
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 0
Language:HTML
Requires
- php: >=5.6.4
- illuminate/support: 5.4.*
- laravelcollective/html: ^5.4.0
Requires (Dev)
- phpspec/phpspec: ~2.0
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2024-11-24 05:24:00 UTC
README
Laravel blog content with vuejs suport
TODO : :
Basic Blog Package
This package is under development.
Install Laravel :
$ composer create-project bantenprov/tanara:dev-dev htdocs
$ cd htdocs
$ php artisan make:auth
add in layout/app.blade.php after
<!-- Scripts --> <script src="{{ asset('js/app.js') }}"></script> <script> var base_url = "{{ url('/') }}";</script> @stack('script')
Install VueJs :
$ npm install
# latest stable
$ npm install vue
$ npm run dev
Install Vue Blog :
$ composer require bantenprov/vue-blog:"1.0.0"
Add the package service provider to the providers
array on /config/app.php
:
// /config/app.php 'providers' => [ // Blog Package Bantenprov\VueBlog\BlogServiceProvider::class, Collective\Html\HtmlServiceProvider::class, ]; 'aliases' => [ 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, ];
Add the BlogUserTrait
to your User
model. This sets up Eloquent relationships:
<?php namespace App; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use Bantenprov\VueBlog\Traits\BlogUserTrait; class User extends Authenticatable { use Notifiable; use BlogUserTrait; }
Change app.js in resources/assets/js/app.js
// Vue.component('example', require('./components/Example.vue')); // // const app = new Vue({ // el: '#app' // }); Vue.component('vue-pagination', require('./components/pagination.vue'));
Artisan command :
$ php artisan vendor:publish --tag=vue_assets $ php artisan vendor:publish --tag=vue_migrations $ npm run dev $ php artisan migrate