Download the PHP package marksitko/laravel-unsplash without Composer

On this page you can find all versions of the php package marksitko/laravel-unsplash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-unsplash

Powerful Unsplash package for Laravel

Provides a fluent api to use the Unsplash within Larvel applications. Use public actions or store images directly in your storage and persists all copyright informations automatically with the databse connector.

Latest Version on Packagist Build Status Quality Score Total Downloads

Install

Laravel-Unsplash comes with package discovery and Laravel will register the service provider and facade automatically. Just in case you wanna add it manually, you should provide it in config/app.php

Service provider

Facade

Next you should publish the configuration.

Optional

If you wanna use Laravel-Unsplash with the database connector you have to publish the migration files.

It creates 2 migrations. One to store additional informations about stored image and one morph table to use it with the HasUnsplashables trait.

Configuration

You have to provide a unsplash api access key in your .env file. Read how to generate a Unsplash API key

Optional configurations:

Basic Usage

Take a look at the full Unsplash API documentation https://unsplash.com/documentation

Random Photos

Photos

Users

Search

Collections

Topics

Stats

Usage with Database

If you wanna persist automaticly some informations (i.e. Copyrights) about you stored images you have to run the published migrations. In case you dont have ran the optional command, we start at the beginning:

When migration is successfull, you have to adjust the .env

Now when you execute store() on the Unsplash client, the image is stored in your provided disc and informations like

However, these informations are all required to use a unsplash photo on your website.

Example with Unsplash Client

You are now also able to use the build in UnsplashAsset Model Example with UnsplashAsset Model

You can also use the HasUnsplashables Trait on any model.

Example with HasUnsplashables Trait on the User Model

Now you are able to use it like:

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.


All versions of laravel-unsplash with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marksitko/laravel-unsplash contains the following files

Loading the files please wait ....