Profile photo camera support for Laravel Spark.
brucelampson/laravel-spark-camera is a Laravel package for profile photo camera support for laravel spark..
It currently has 1 GitHub stars and 17 downloads on Packagist (latest version 2.0.0).
Install it with composer require brucelampson/laravel-spark-camera.
Discover more Laravel packages by brucelampson
or browse all Laravel packages to compare alternatives.
Last updated
This package adds support for capturing images from your computer or phone camera.
Run composer require eusebiu/laravel-spark-camera
Add Eusebiu\LaravelSparkCamera\CameraServiceProvider::class to your providers array in config/app.php
Run php artisan vendor:publish --provider="Eusebiu\LaravelSparkCamera\CameraServiceProvider" --tag=assets
Edit resources/views/vendor/spark/settings/profile/update-profile-photo.blade.php:
@include('camera::camera-modal') right before closing the last div.<button type="button" class="btn btn-primary" :disabled="form.busy" @click="openCamera">Camera</button>.Edit resources/assets/js/spark-components/settings/profile/update-profile-photo.js:
var camera = require('./update-profile-photo-camera'); at the top.mixins option to mixins: [base, camera].Run npm install --save webcamjs
Run npm run dev
Edit resources/sass/app.scss and add the following css
#profile-photo-camera-preview,
#profile-photo-camera-preview video {
width: 100% !important;
height: auto !important;
min-width: 100px;
min-height: 100px;
}
This package uses WebcamJS, so if you want to configure it, overide the
configureWebcamjsmethod in yourupdate-profile-photo.jsfile.