marksitko / laravel-unsplash Goto Github PK
View Code? Open in Web Editor NEWPowerful Unsplash package for Laravel
License: MIT License
Powerful Unsplash package for Laravel
License: MIT License
In my code, I'm calling:
Unsplash::trackPhotoDownload($id);
But in my Unsplash dashboard, the download count is not incrementing. Is this endpoint still working correctly?
If search for foul word then how can we handle it with Unsplash.?
Hi,
when trying to install this package into a fresh Laravel 10 project, I get the following errors:
Problem 1
- marksitko/laravel-unsplash 1.0.0 requires php ^7.2 -> your php version (8.2.2) does not satisfy that requirement.
- marksitko/laravel-unsplash 1.1.0 requires php ^7.3 -> your php version (8.2.2) does not satisfy that requirement.
- marksitko/laravel-unsplash[1.1.1, ..., 1.1.2] require illuminate/support ^6.0|^7.0|^8.0 -> found illuminate/support[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
- marksitko/laravel-unsplash[2.0.0, ..., 2.0.1] require illuminate/support ^8.0|^9.0 -> found illuminate/support[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.0] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires marksitko/laravel-unsplash * -> satisfiable by marksitko/laravel-unsplash[1.0.0, 1.1.0, 1.1.1, 1.1.2, 2.0.0, 2.0.1].
I got this error when installing this package in a new laravel project. I think the composer package is not updated on packagist
Your requirements could not be resolved to an installable set of packages.
Problem 1
- marksitko/laravel-unsplash[2.0.0, ..., 2.0.1] require illuminate/support ^8.0|^9.0 -> found illuminate/support[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
- marksitko/laravel-unsplash[2.1.0, ..., 2.2.0] require illuminate/support ^8.0|^9.0|^10.0 -> found illuminate/support[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.12] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires marksitko/laravel-unsplash ^2 -> satisfiable by marksitko/laravel-unsplash[2.0.0, 2.0.1, 2.1.0, 2.2.0].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Hi @marksitko, thanks for this package.
I am trying to use but I am getting non-static method MarkSitko\\LaravelUnsplash\\Unsplash::search() should not be called statically
If I use \Unsplash::
, it throws this error: Argument 1 passed to Symfony\Component\HttpFoundation\Response::setContent() must be of the type string or null, object given, called in /var/www/kapa99/vendor/laravel/framework/src/Illuminate/Http/Response.php on line 72
I am using in an API endpoint. If I try it on tinker it works but no in the controller.
Is there any configuration I am missing to get this package working? Or what is the correct import to use the library?
Regards
Never mind. I could make it to work.
PHP v8.1
When using the following code from the Readme:
// Returns the created unsplash asset record
$databaseRecord = UnsplashAsset::api()->randomPhoto()->store();
The $databaseRecord
object will be a string representation of the model (via toString()
) rather than the model itself. I believe this is because Unsplash->store is defined as returning a string, rather than either a string or a Model instance.
Hi. I ran into the following errors while trying to upgrade to Laravel 9
Your requirements could not be resolved to an installable set of packages.
Problem 1
- marksitko/laravel-unsplash 1.1.0 requires php ^7.3 -> your php version (8.0.11) does not satisfy that requirement.
- marksitko/laravel-unsplash[1.1.1, ..., 1.1.2] require illuminate/support ^6.0|^7.0|^8.0 -> found illuminate/support[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.3] but it conflicts with another require.
- Root composer.json requires marksitko/laravel-unsplash ^1.1 -> satisfiable by marksitko/laravel-unsplash[1.1.0, 1.1.1, 1.1.2].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I'd like to help make this package compatible with laravel 9 but am not entirely familiar with the dependency chain here.
If empty results then showing this Client error:
message: "Client error: GET https://api.unsplash.com/photos/random?orientation=landscape&query=xdgdsgdsgdgdgd&count=6
resulted in a 404 Not Found
response:\n{"errors":["No photos found."]}\n"
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.