#### Category : spatie

I created an application using the spatie permission package. And I want to categorize the permissions as shown below, without using the package Sourc..

I am using laravel spatie for filtering the model i have following filters in allowed filter array $this->allowedFilters = [ ‘name’, AllowedFilter::exact(‘company_id’), ‘location’, ‘summary’, ‘client_name’, ]; when I make request like past-projects?filter[company_id]=${companyId}&filter[name]=${search}&filter[summary]={company_id} it searches for the data which exactly contains all the passed search params with AND condition and returns no results if any of .. Read more i use spatie for ACL in my application . i use rest api not web anyway i have 2 role, freelance and employer and i want to check the role in for own apis for access limitation to APIs and i am fine with this. i did’nt define any permission i defined just roles. my .. Read more If i make a request like this in spatie analytics:$analyticsData = Analytics::performQuery( Period::days(1), ‘ga:sessions’, [ ‘metrics’ => ‘ga:sessions, ga:pageviews’, ‘dimensions’ => ‘ga:yearMonth’ ] ); what does "days(1) refer to ? is it from 00:00 to 23:59 or from 24 hour ago until now? i tried reading the start and end time in the result ..

I’m using Laravel Backpack within Spatie Laravel Translatable. I want to pass some translatable fields into the front but i’ve some issue. I have a field named "extras" which is used by backpack to store repeatable field (I need this field to store some sections that i’ll use later on the front-end later). The problem ..

I want to convert my existing app to multi-tenant and don’t want to use multiple databases. just read that the given package is allowing that. https://github.com/spatie/laravel-multitenancy I have read the single database documentation here: https://spatie.be/docs/laravel-multitenancy/v2/installation/using-a-single-database But what’s next ?? Let’s say right now users are storing into users’ tables, and by using this package I ..

Is there any way to work with Spatie roles and permission by indicating different model name not like using user model in Laravel 8? Sourc..

I am using Spatie’s Media Library (Pro), and we have an SPA that requires all the calls from the front-end to use an auth token with some "context" information. (Our front-end is Nuxt.js/Vue.js; we send the calls to a micros-service gateway, but that’s not really part of the issue here, only explaining why we can’t ..

Hello There im new to laravel and want to use spatie’s query builder package for filtering and sorting but this issue occurs while installing. Problem 1 – spatie/laravel-query-builder[3.5.0, …, v3.x-dev] require illuminate/database ^6.20.13|^7.30.4|^8.22.2 -> found illuminate/database[v6.20.13, …, 6.x-dev, v7.30.4, 7.x-dev, v8.23.1, …, 8.x-dev] but it conflicts with another require. – Root composer.json requires spatie/laravel-query-builder ^3.5 ..

I read all the documentation and I can’t find the updateMedia() Method in the documentation, where I can find this method, so I can read and understand more about this package? Sourc..

I am new to Laravel and I am having modify an existing Laravel application to only give some permission to a guard. When I use the command php artisan permission:show, I see the following: Guard: admin +—————————————+—————+ | | Administrator | +—————————————+—————+ | admin | ✔ | | admin.admin-user.create | ✔ | | admin.admin-user.delete | ..

I try to create a new laravel app via the laravel installer with laravel new <appname>. This works without a problem. Once I try to install the spatie/medialibrary I get the following error that I cannot explain: $composer require "spatie/laravel-medialibrary:^9.0.0" ./composer.json has been updated Running composer update spatie/laravel-medialibrary Loading composer repositories with package information .. Read more I’m using the Spatie Laravel Dashboard in Laravel Framework 8.49.0 and in my local machine (MacOS Big Sur / MAMP Pro / PHP 7.4) everything is working fine, but when I deployed to a production machine I get the error "Unable to locate a class or view for component [dashboard]." I’m following the instructions in .. Read more I’m saving images from local disk to cloud (DO storage) disk by following codes in controller$claim->addMediaFromDisk($front_image, ‘public’)->usingFileName("front-image")->toMediaCollection(‘claim-images’, ‘do_spaces’);$claim->addMediaFromDisk($right_image, ‘public’)->usingFileName("right-image")->toMediaCollection(‘claim-images’, ‘do_spaces’);$claim->addMediaFromDisk($left_image, ‘public’)->usingFileName("left-image")->toMediaCollection(‘claim-images’, ‘do_spaces’); this trick works but saving those images in 3 different directory in cloud storage. But I want all three images in same directory. I see there is built in method .. Read more When I try to do this php artisan migrate –path=database/migrations/landlord –database=landlord I get the following error: PS C:laragonwwwcommerce> php artisan migrate –path=database/migrations/landlord –database=landlord ************************************** * Application In Production! * ************************************** Do you really wish to run this command? (yes/no) [no]: > y Dropped all tables successfully. IlluminateDatabaseQueryException SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect .. Read more I use Laravel v8 with spatie/laravel-feed v4 with this codes: routes/web.php Route::get(‘feed’, ‘[email protected]’)->name("feeds.main"); config/feed.php <?php return [ ‘feeds’ => [ ‘main’ => [ /* * Here you can specify which class and method will return * the items that should appear in the feed. For example: * [AppModel::class, ‘getAllFeedItems’] * * You can also pass .. Read more I use Laravel 8 with spatie/laravel-feed 4.0 package with this codes: routes/web.php Route::feeds(); config/feed.php <?php return [ ‘feeds’ => [ ‘main’ => [ /* * Here you can specify which class and method will return * the items that should appear in the feed. For example: * [AppModel::class, ‘getAllFeedItems’] * * You can also pass .. Read more In laravel I have used spatie/data-transfer-object to cast one of my column as protected$casts = [ ‘details’ => ProductDetails::class, ]; In my ProductDetails DTO I further want to cast two of my date fields class ProductDetails extends CastableDataTransferObject { use HasDates; public int $number #[CastWith(ProductDateCaster::class)] public int$start_date; //est DD/MM/YY #[CastWith(ProductDateCaster::class)] public int $end_date; .. Read more Originally posted on the discussions page on the repo itself as bug, but left unanswered. Therefore, coming here to ask if anyone has had the same issue and if they found a fix. Context: Within my form request I have a custom rule that handles location data. I also have a rule to handle house .. Read more strong textI am getting different google api results when running this function on locally in comparison to my server. public static function debug(){$date = Carbon::now(‘Europe/Berlin’); $date->setISODate(2021,25);$start = $date->copy()->startOfWeek();$end = $date->copy()->endOfWeek();$ga= Analytics::performQuery( Period::create($start ,$end), ‘ga:pageviews’, [ ‘metrics’ => ‘ga:pageviews’, ‘dimensions’ => ‘ga:date’, ‘filters’ => ‘ga:pagePath=~/page1*,ga:pagePath=~/page2*,ga:pagePath=~/page3*,ga:pagePath=~/page34,ga:pagePath=~/page5*’ ] ); return $ga; } Results .. Read more I am using this library : https://github.com/spatie/laravel-analytics I am trying to figure out how to do a User Activity request as documented here: https://developers.google.com/analytics/devguides/reporting/core/v4/user-reporting. I know that you can make custom reports with laravel analytics with ‘Analytics::perfomQuery’. I cant seem to find the right metrics and dimensions to get the request right. I have tried .. Read more I have been using spatie media library for over a year and a half and over the last month have encountered the folloing error: SymfonyComponentProcessExceptionRuntimeExceptionSpatieMediaLibraryJobsPerformConversions The provided cwd "" does not exist. SymfonyComponentProcessExceptionRuntimeException · The provided cwd "" does not exist. vendor/symfony/process/Process.php:344 SymfonyComponentProcessProcess::start } if (!is_dir($this->cwd)) { throw new RuntimeException(sprintf(‘The provided cwd "%s" does not ..