team-tea-time / laravel-filer Goto Github PK
View Code? Open in Web Editor NEWA simple Laravel ORM attachment solution supporting multiple attachment types and relationships
License: MIT License
A simple Laravel ORM attachment solution supporting multiple attachment types and relationships
License: MIT License
Currently when I am processing a file, php renames the file to a random string like phpBeceYT
. This is fine, however I would like to download the file with the original name. Therefore I set the title to the original filename. How can this be achieved with laravel-filer? Because right now, when I download the file, I don;t get a file with the correct extension.
Hello, thanks for good work.
but there is a problem with multiple files . If I create -> attach ($ file) for one model more than once, in the table filer_attacments recorded only the last attach.
in file AttachableTrait.php i find follow code:
$attach = Attachment::firstOrNew([
'user_id' => $userID,
'model_id' => $this->id,
'model_key' => $options['key']
]);
and change to
$attach = new Attachment([
'user_id' => $userID,
'model_id' => $this->id,
'model_key' => $options['key']
]);
It work for new multiattachments. but it have not tested it for update (I do not know how to do it).
sorry for bad english.
hello , first thanks for this great package
I'm having issue when useing attach inside a foreach loop
It saves the files to db.filer_attachments , but only adds a relation to db.filer_local_files to the last file only
any ideas ?
Since method Attachment->user()
uses config('filer.user.model')
to get the related user model class, the published config file should also provide a related entry like
'user' => [
'model' => App\User::class,
],
or something similar. Otherwise the use of the method will raise an execption
FatalErrorException in Model.php line 765: Class name must be a valid object or a string
Hi! Great job on the package, is just what I was looking for, a simple way to manage attachments with polymorphic relations. Cool.
Just one note: I think it would be nice that user_id at filer_attachment table could accept the null value. In my case, I'm attaching to a model without any user relation relevance so now I would need to relate the attachement to a dummy user. Allow null in this case will be perfect, I think this would improve the versatility of the package.
Regards!
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.