filamentphp / demo Goto Github PK
View Code? Open in Web Editor NEWSource code for the demo.filamentphp.com website.
Home Page: https://demo.filamentphp.com
License: MIT License
Source code for the demo.filamentphp.com website.
Home Page: https://demo.filamentphp.com
License: MIT License
Step to reproduce:
I have found that if dropdown is searchable and you just click enter on it triggers modal with 500 status page. See vid below.
Laravel version: v10.26.2
Filament version v3.0.68
PHP version: v8.2.11
I'm having a problem using s3 storage driver in Laravel filament. I'm getting this exception:
League \ Flysystem \ UnableToCheckDirectoryExistence
Unable to check existence for: https:/spaces.link/bucket-name/posts/istockphoto-457796927-612x612.jpg
I'm using Digital Ocean spaces to store images. I can load this image by going to the URL just fine. Only thing I noticed, is that the protocol part in URL is missing one /
, so instead of https://
it's actually https:/
. I assume that is the reason for this error, but unfortunately, I can't find a way to fix it. Here's the setup of my code:
.env:
DO_SPACES_KEY=key
DO_SPACES_SECRET=secret
DO_SPACES_ENDPOINT=https://spaces.url
DO_SPACES_REGION=fra1
DO_SPACES_BUCKET=bucket.name
DO_SPACES_USE_PATH_STYLE_ENDPOINT=true
filesystems.php
's3' => [
'driver' => 's3',
'key' => env('DO_SPACES_KEY'),
'secret' => env('DO_SPACES_SECRET'),
'endpoint' => env('DO_SPACES_ENDPOINT'),
'region' => env('DO_SPACES_REGION'),
'bucket' => env('DO_SPACES_BUCKET'),
'use_path_style_endpoint' => env('DO_SPACES_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
'visibility' => 'public',
],
This is how I retrieve the image url:
return Storage::disk('s3')->url($featuredImage->path);
If I do a dd()
of this value, I get the correct link with two // in the protocol. But the same exception occurs. If I comment out this value, I get no exception.
"https://spaces.link/bucket.name/posts/istockphoto-457796927-612x612.jpg" // app/Models/Post.php:103
If it is relevant in any way, I created a getter for this in the Post.php
model, and this is where I get the mentioned exception:
protected function featuredImage(): Attribute{
return Attribute::make(
get: fn () => $this->getFeaturedImage(),
);
}
public function getFeaturedImage(){
$featuredImage = $this->images()->where('featured', true)->first();
if($featuredImage){
return Storage::disk('s3')->url($featuredImage->path);
}
return null;
}
public function images(){
return $this->hasMany(PostImage::class, 'post_id');
}
When I remove the getter, everything work just fine. Also, the getter works just fine when using tinker
, so that's why I assume that there is an error with filament.
When we run the demo for a first start,
it is taking a long time. This run took 7m26s.
As spoken, I'll address this by having some random generated images already present.
I'll also make the process of getting images automatic, so that no manual labor is needed for such a things, like spinning the images, switching, etc
I+ll open the PR once this is finished for review.
Thanks
On php artisan serve, the application runs without bootsrap
when you create a new order
or edit order
total_price not update after order saved
Hi,
is there a possibilty to register/add a view of a model as navigationItem?
Something like ProfileResource but the index is the auth()->user() View and there is no table. One could use InfoList and getRecordSubNavigation() to control a lot of entity related settings with no hassle to create custom pages.
The navigation bar postion of getRecordSubNavigation() would be nice on top/bottom as tab too.
Really big thx for all the work and effort you put in this project, it's just awesome.
sincerely, ed
OS: Windows 11
Browser:
filament/filament
have no idea
have no idea
have no idea
have no idea
No response
No response
Just wanted to let ya'll know that when using mySQL instead of sqlite there is an error after running "php artisan db:seed" for this..
It works when I set config/database mysql strict=false, but otherwise it won't work. Don't know if you want to fix that or just tell the users who use mySQL instead to set that in config/database.. might lead to incorrect formats though when doing that. Also it's impossible to use this unless you enable pdo_sqlite extension in php.ini, some people who don't want to use sqlite and instead use mysql will have an error whenever they want to use the "composer install, composer require, or composer update" command... unless they want to use "--ignore-platform-req=ext-pdo_sqlite" at the end of every single composer command. Might want to let those people know this as well.
Not sure why private repo's are included in the demo?
Could not fetch https://api.github.com/repos/symfony/css-selector/zipball/aedf3cb0f5b929ec255d96bbb4909e9932c769e0, please review your configured GitHub OAuth token or enter a new one to access private repos
Head to https://github.com/settings/tokens/new?scopes=repo&description=...
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'filament.app\filament\resources\shop\category' doesn't exist (SQL: select count(*) as aggregate from `App\Filament\Resources\Shop\Category` where `slug` = test)
type="url"
which requires the protocol as a prefixed but is seeded without.DB_CONNECTION=mysql
New Fresh MySQL Database Coming migration already exists.
$ php artisan migrate:refresh
INFO Preparing database.
Creating migration table ............................................................................................................... 12ms FAIL
Illuminate\Database\QueryException
SQLSTATE[42S01]: Base table or view already exists: 1050 Table '`filament`.`migrations`' already exists (SQL: create table `migrations` (`id` int unsigned not null auto_increment primary key, `migration` varchar(255) not null, `batch` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
at C:\xampp\htdocs\root\prod\filament-demo\vendor\laravel\framework\src\Illuminate\Database\Connection.php:759
755▕ // If an exception occurs when attempting to run a query, we'll format the error
756▕ // message to include the bindings with SQL, which will make this exception a
757▕ // lot more helpful to the developer instead of just the database's errors.
758▕ catch (Exception $e) {
➜ 759▕ throw new QueryException(
760▕ $query, $this->prepareBindings($bindings), $e
761▕ );
762▕ }
763▕ }
1 C:\xampp\htdocs\root\prod\filament-demo\vendor\laravel\framework\src\Illuminate\Database\Connection.php:544
PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table '`filament`.`migrations`' already exists")
2 C:\xampp\htdocs\root\prod\filament-demo\vendor\laravel\framework\src\Illuminate\Database\Connection.php:544
PDOStatement::execute()
From Associating and dissociating records we know that HasMany, HasManyThrough, and MorphMany relationships support this feature.
Need implementation of Associating and dissociating records.
Aren't there supposed to be images on this page? https://demo.filamentphp.com/blog/posts. Same on the products page.
filament/filament
have no idea
have no idea
have no idea
have no idea
As you can see in the above image the date of birth calendar allows us to select future dates right? it should not be allowed to us. it should be disabled in the calendar.
No response
No response
Hi - the demo install went as documented. however the site visualization is strange as the icons for the menu are super large (entire screen). am I missing a component?
like if some one click on editor role widget the table only show those records whose role is editor
the ->extraAttributes([
'class' => 'cursor-pointer',
]), not working for me
There is no currencies table migration or seeder
This demo is very well designed, and it would be neat to be able to use components from it. However, since there is no license file attached, no-one is allowed to use the code herein. https://choosealicense.com/no-permission/
I would suggest the MIT License, as that's what both Laravel and FilamentPHP uses.
All the best, Caen
Effects Area Customers & Orders
https://crm.storeconn.de/shop/customers
could not find driver
SELECT * FROM "countries" WHERE "countries"."id" = mp limit 1
App \ Filament \ Resources \ Shop \ CustomerResource : 86 App\Filament\Resources\Shop\{closure}
got this error when trying to setup the demo at my local
error in
php artisan migrate:refresh
public function down()
{
Schema::dropIfExists('shop_order_addresses');
}
instead of
public function down()
{
Schema::dropIfExists('addresses');
}
Are there any alternative packages for "squirephp/currencies-en" and "squirephp/countries-en" ?
Using MySql i got the message below
Creating shop products...
16/50 [========>-------------------] 32%
Illuminate\Database\QueryException
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2023-03-26 03:21:04' for column abc_abcb_b10
.shop_products
.updated_at
at row 1 (SQL: insert into shop_products
(name
, slug
, sku
, barcode
, description
, qty
, security_stock
, featured
, is_visible
, old_price
, price
, cost
, type
, published_at
, created_at
, updated_at
, shop_brand_id
) values (Cross-group demand-driven synergy, cross-group-demand-driven-synergy, 53728579, 0258279495410, Alice desperately: 'he's perfectly idiotic!' And she squeezed herself up and leave the court; but on second thoughts she decided on going into the air off all its feet at the Cat's head with great., 5, 5, 1, 1, 440.86, 339.05, 106, downloadable, 2022-10-05 01:56:12, 2022-10-19 00:59:44, 2023-03-26 03:21:04, 177))
eileenme raised it on discord, confirmed error on live demo.
When creating an order on demo https://demo.filamentphp.com/shop/orders/create there is an server error. I run on my side that the error shows:
Call to a member function address() on null
More info:
App \ Forms \ Components\ AddressForm: 26
saveRelationships
$relationship = $record->{$this->getRelationship()}();
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.