PHP code example of mtconsultingroup / canvas-portfolio

1. Go to this page and download the library: Download mtconsultingroup/canvas-portfolio 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/ */

    

mtconsultingroup / canvas-portfolio example snippets


/*
|--------------------------------------------------------------------------
| Base Domain
|--------------------------------------------------------------------------
|
| This is the subdomain where Canvas will be accessible from. If the
| domain is set to null, Canvas will reside under the defined base
| path below. Otherwise, this will be used as the subdomain.
|
*/

'domain' => env('CANVAS_DOMAIN', null),

/*
|--------------------------------------------------------------------------
| Base Path
|--------------------------------------------------------------------------
|
| This is the URI where Canvas will be accessible from. If the path
| is set to null, Canvas will reside under the same path name as 
| the application. Otherwise, this is used as the base path.
|
*/

'path' => env('CANVAS_PATH_NAME', 'admin'),

/*
|--------------------------------------------------------------------------
| Route Middleware
|--------------------------------------------------------------------------
|
| These middleware will be attached to every route in Canvas, giving you
| the chance to add your own middleware to this list or change any of
| the existing middleware. Or, you can simply stick with the list.
|
*/

'middleware' => [
    'web',
],

/*
|--------------------------------------------------------------------------
| Storage
|--------------------------------------------------------------------------
|
| This is the storage disk Canvas will use to put file uploads. You may
| use any of the disks defined in the config/filesystems.php file and
| you may also change the maximum upload size from its 3MB default.
|
*/

'storage_disk' => env('CANVAS_STORAGE_DISK', 'local'),

'storage_path' => env('CANVAS_STORAGE_PATH', 'public/canvas'),

'upload_filesize' => env('CANVAS_UPLOAD_FILESIZE', 3145728),

/*
|--------------------------------------------------------------------------
| Unsplash Integration
|--------------------------------------------------------------------------
|
| Visit https://unsplash.com/oauth/applications to create a new Unsplash
| app. Use the confidential Access Key given to you to integrate with
| the API. Note that demo apps are limited to 50 requests per hour.
|
*/

'unsplash' => [
    'access_key' => env('CANVAS_UNSPLASH_ACCESS_KEY'),
]

/*
|--------------------------------------------------------------------------
| E-Mail Notifications
|--------------------------------------------------------------------------
|
| This option controls e-mail notifications that will be sent via the
| default application mail driver. A default option is provided to
| support the notification system as an opt-in feature.
|
|
*/

'mail' => [
    'enabled' => env('CANVAS_MAIL_ENABLED', false),
]

/*
|--------------------------------------------------------------------------
| Portfolio
|--------------------------------------------------------------------------
|
| This option enables or disables the sections dedicated to the portfolio.
| By default it is disabled.
|
|
*/

'portfolio' => [
    'enabled' => env('CANVAS_PORTFOLIO_ENABLED', false),
]

/*
|--------------------------------------------------------------------------
| Enable languages
|--------------------------------------------------------------------------
|
| This option allows you to edit the contents in different languages
| (available languages: IT, EN, ES, FR, DE).
| By default only the Italian language is enabled, to add others write them
| in the .env file (example: CANVAS_LANGUAGES=it,en,de)
|
|
*/

'languages' => env('CANVAS_LANGUAGES', 'it')

/*
|--------------------------------------------------------------------------
| Enable automatic translation
|--------------------------------------------------------------------------
|
| This option allows you to automatically translate all the contents in the
| Italian language into any of the available languages.
| To enable this function, just enter your google key in the .env file.
|
|
*/

'google_translate' => [
    'access_key' => env('CANVAS_GOOGLE_TRANSLATE_ACCESS_KEY'),
]
bash
php artisan canvas:install
bash
php artisan storage:link
bash
php artisan canvas:ui
bash
php artisan canvas:migrate
bash
php artisan canvas:publish
bash
{
    "scripts": {
        "post-update-cmd": [
            "@php artisan canvas:publish --ansi"
        ]
    }
}