for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MarkSitko\LaravelUnsplash\Endpoints;
trait Search
{
/**
* Search photos
* Get a single page of photo results for a query.
* @link https://unsplash.com/documentation#search-photos
*
* @return MarkSitko\LaravelUnsplash\Endpoints\Search
*/
public function search()
$this->apiCall = [
apiCall
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
'endpoint' => 'search/photos',
];
return $this;
}
* Search collections
* Get a single page of collection results for a query.
* @link https://unsplash.com/documentation#search-collections
public function searchCollections()
'endpoint' => 'search/collections',
* Search users
* Get a single page of user results for a query.
* @link https://unsplash.com/documentation#search-users
public function searchUsers()
'endpoint' => 'search/users',
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: