PHP code example of m-porter / vue-template-loader
1. Go to this page and download the library: Download m-porter/vue-template-loader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
m-porter / vue-template-loader example snippets
// routes/web.php
use Illuminate\Support\Facades\Route;
use MPorter\VueTemplateLoader\Loader;
Route::get('/', function () {
return view(Loader::getTemplate('example-app'));
});
php artisan vendor:publish --provider="MPorter\VueTemplateLoader\ServiceProvider"