Giter Site home page Giter Site logo

cretueusebiu / laravel-spark-camera Goto Github PK

View Code? Open in Web Editor NEW
29.0 5.0 8.0 5 KB

Profile Photo Camera support for Laravel Spark

Home Page: https://packagist.org/packages/eusebiu/laravel-spark-camera

License: MIT License

JavaScript 57.04% PHP 20.42% HTML 22.54%
laravel spark php camera laravel-spark

laravel-spark-camera's Introduction

Profile Photo Camera support for Laravel Spark

This package adds support for capturing images from your computer or phone camera.

Demo

Installation

  • 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:

    • Add @include('camera::camera-modal') right before closing the last div.
    • Add the Camera button <button type="button" class="btn btn-primary" :disabled="form.busy" @click="openCamera">Camera</button>.
    • It should look like this.
  • Edit resources/assets/js/spark-components/settings/profile/update-profile-photo.js:

    • Add var camera = require('./update-profile-photo-camera'); at the top.
    • Change the mixins option to mixins: [base, camera].
  • Run npm install --save webcamjs

  • Run npm run dev

This package uses WebcamJS, so if you want to configure it, overide the configureWebcamjs method in your update-profile-photo.js file.

laravel-spark-camera's People

Contributors

cretueusebiu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

laravel-spark-camera's Issues

Laravel 5 support

Can I use this package in laravel 5 project ? if yes please show me how! Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.