laravel-spark

laravel-spark-google2fa Provider class not found after Spark update to v9.0

帅比萌擦擦* 提交于 2019-12-24 18:47:55
问题 I recently updated a Laravel/Spark web application to the latest version of Spark (v 9.* ) via composer . Another package I use is Laravel-Spark-Google2FA which I also updated from v 1.* to v 2.* . Setup: The laravel-spark-google2fa package has a Laravel service provider class that resides in /project-root/laravel/spark/src/Providers/Google2FAServiceProvider.php In Laravel we specify this in /project-root/laravel/config/app.php with the following line in the providers array: Laravel\Spark

How to bind user object to request in a middleware

老子叫甜甜 提交于 2019-12-23 17:28:02
问题 i'm writing an application in Laravel Spark 1.0 (Laravel 5.2). I wrote a custom middleware for agent (api) authentication. This is the code: <?php namespace App\Http\Middleware; use App\Agent; use Closure; use Illuminate\Http\Request; class AgentAuth { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if( isset($request->token) && !empty($request->token) ) { $agent = Agent

Laravel Spark: CSRF Failure on Login Page

折月煮酒 提交于 2019-12-23 01:12:46
问题 Using Laravel Spark (or any Laravel login form with CSRF protection), if a user leaves the login page open for a period of time (like, say, leaving the window open at work and returning to it later) and then attempts to login, they're presented with an error. Whoops, looks like something went wrong. (1/1) TokenMismatchException in VerifyCsrfToken.php (line 68) This makes sense, as CSRF tokens are date/time sensitive. However, the user experience here is less than ideal. Before we go

Upgrading Laravel Spark to v5.0 from v4.0

只愿长相守 提交于 2019-12-10 23:18:15
问题 I upgraded my application from Laravel v5.4 to v5.5. I need to upgrade Laravel Spark from v4.0 to v5.0 as Spark 5.0 is a free upgrade for Spark applications and provides compatibility with Laravel 5.5. The best and easiest way to upgrade Spark is via Spark CLI php artisan spark:update --major But as Spark v6.0 is available which is not a free upgrade from Spark v5.0 or lower, I get the following error: In RequestException.php line 113: Client error: `GET https://spark.laravel.com/api/releases

Laravel Spark is not displaying images that are stored in the /storage/app/public/profiles/ directory

我们两清 提交于 2019-12-07 05:32:09
问题 The default for uploaded images appears to be /storage/app/public/profiles/, but the frontend generated URL of /storage/profiles/ image isn't being found. I tried to find any sort of routing for that directory and haven't been able to do so. Any help would be appreciated. 回答1: You must link to the storage directory. From the documentation: Once Spark is installed, you should link the public/storage directory to your storage/app/public directory. Otherwise, user profile photos stored on the

Laravel Spark: CSRF Failure on Login Page

你。 提交于 2019-12-06 08:36:21
Using Laravel Spark (or any Laravel login form with CSRF protection), if a user leaves the login page open for a period of time (like, say, leaving the window open at work and returning to it later) and then attempts to login, they're presented with an error. Whoops, looks like something went wrong. (1/1) TokenMismatchException in VerifyCsrfToken.php (line 68) This makes sense, as CSRF tokens are date/time sensitive. However, the user experience here is less than ideal. Before we go reinventing the wheel. Is there any Laravel Standard Practice™ for providing a better user experience around

Laravel Spark is not displaying images that are stored in the /storage/app/public/profiles/ directory

爷,独闯天下 提交于 2019-12-05 11:01:39
The default for uploaded images appears to be /storage/app/public/profiles/, but the frontend generated URL of /storage/profiles/ image isn't being found. I tried to find any sort of routing for that directory and haven't been able to do so. Any help would be appreciated. You must link to the storage directory. From the documentation : Once Spark is installed, you should link the public/storage directory to your storage/app/public directory. Otherwise, user profile photos stored on the local disk will not be available And the relevant code: ln -s /path/to/storage/app/public /path/to/public

How do I fix a “Vue packages version mismatch” error on Laravel Spark v4.0.9?

断了今生、忘了曾经 提交于 2019-11-30 06:06:47
When I run npm run dev on a Laravel Spark v4.0.9 app, I get the following error: Module build failed: Error: Vue packages version mismatch: - vue@2.0.8 - vue-template-compiler@2.2.6 This may cause things to work incorrectly. Make sure to use the same version for both. If you are using vue-loader@>=10.0, simply update vue-template-compiler. If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest. My package.json looks like this: { "private": true, "scripts": { "dev": "cross-env NODE_ENV=development node_modules/webpack/bin

How do I fix a “Vue packages version mismatch” error on Laravel Spark v4.0.9?

点点圈 提交于 2019-11-29 05:36:17
问题 When I run npm run dev on a Laravel Spark v4.0.9 app, I get the following error: Module build failed: Error: Vue packages version mismatch: - vue@2.0.8 - vue-template-compiler@2.2.6 This may cause things to work incorrectly. Make sure to use the same version for both. If you are using vue-loader@>=10.0, simply update vue-template-compiler. If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest. My package.json looks like