Looking to explore countries based on their independence dates? The following methods make it easy to find countries that match specific independence criteria. Whether you're curious about countries that gained independence in a certain year, before or after a particular date, or even within a specific month, these methods have you covered!
Find countries that gained independence after a specific date.
->whereIndependenceAfter()
Country::whereIndependenceAfter('1950-01-01')->get();
Find countries that gained independence before a specific date.
->whereIndependenceBefore()
Country::whereIndependenceBefore('1900-01-01')->get();
Find countries that gained independence before a specific date.
->whereIndependenceBetweenDates()
Country::whereIndependenceBetweenDates('1900-01-01', '2000-12-31')->get();
Find countries with a specific independence date.
->whereIndependenceDay()
Country::whereIndependenceDay('1776-07-04')->get();
Find countries that gained independence in a specific month.
->whereIndependenceDay()
Country::whereIndependenceMonth(7)->get(); // July
Find countries that gained independence in a specific year.
->whereIndependenceYear()
Country::whereIndependenceYear(1960)->get();
How can I help you explore Laravel packages today?