Laravel has a lot of features and an extremely simple architecture. It sometimes leads the programmer to make some mistakes, when it comes time to get the most out of it. Through practical and simple examples we will enter the world of Laravel, starting with the basics and ending with the architecture that Laravel uses.
11. To put it simply, Repository pattern is a kind of
container where data access logic is stored. It hides the
details of data access logic from business logic. In other
words, we allow business logic to access the data object
without having knowledge of underlying data access
architecture. Mar 7, 2015
https://bosnadev.com/2015/03/07/using-repository-pattern-in-laravel-5
46. // Retrieve the first item in the collection
$collection->get(0);
// Default value as fallback
$collection->get(0, 'default value');
// Retrieve using custom key
$collection->get('my_key');
// Custom key and fallback
$collection->get('my_key', 'default value');
47. // Retrieve the first item in the collection
$collection->get(0);
// Default value as fallback
$collection->get(0, 'default value');
// Retrieve using custom key
$collection->get('my_key');
// Custom key and fallback
$collection->get('my_key', 'default value');
48. // Retrieve the first item in the collection
$collection->get(0);
// Default value as fallback
$collection->get(0, 'default value');
// Retrieve using custom key
$collection->get('my_key');
// Custom key and fallback
$collection->get('my_key', 'default value');
49. // Retrieve the first item in the collection
$collection->get(0);
// Default value as fallback
$collection->get(0, 'default value');
// Retrieve using custom key
$collection->get('my_key');
// Custom key and fallback
$collection->get('my_key', 'default value');