Tailor Made Software / CADViewer - Downloads

Laravel

Create a new Laravel project, or to your existing laravel project do the following:

Install cadviewer-script-library under your Laravel project folder: /public/app/. From cadviewer-script-library you only need /cadviewer/app, so copy this into your Laravel project /public/app.

Install the cadviewer-conversion-server cadviewer-conversion-server, see above. This is neeeded to convert CAD files on the back-end.

The Github cadviewer-conversion-server is usually up to date, but you may need to update AutoXchange 2022 and other converters under the Node JS conversion server file structure.

See CADViewer Laravel Install Docs, for some more basic information.

Use the CADViewer sample blade.php files as your reference Laraval blade files, download layouts_cadviewer_laravel02.zip and install these files under /resources/views/layouts/.

NOTE: Make sure your CADViewer blade.php file (cadviewer-space-object-canvas-02.blade.php) in /resources/views/layouts/ , references the correct version of CADViewer from folder: /public/app/cv/cv-pro/.

     <script src="{{ asset('/app/cv/cv-pro/cadviewer_6.5.16a.min.js') }}" type="text/javascript" ></script>

Reference the views through /routes/web.php. A basic setup of /routes/web.php is:


<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {

    //    return view('welcome');

//   return view('layouts.logo-only').view('layouts.cadviewer-textsearch');
return view('layouts.logo-only').view('layouts.cadviewer-space-object-canvas-02');


});

There are some graphical elements needed for the samples, so please add content_svg_laravel.zip as a sub-folder to laravel /public/.

Full integrated Laravel sample

You can download a full integrated CADViewer sample with Laravel on Laragon, use cadviewer-conversion-server cadviewer-script-library-laragon-laravel-sample-01. The full PHP based CAD conversion server is integrated with this sample.



Last updated on 15 Nov 2022
Published on 13 May 2020