Methods summary
public
mixed
|
#
showAds( )
Returns
mixed Gets all ads from the database with atleast one location linked to it,
and passes them along when making the view.
Author
Stefano Groenland
|
public
mixed
|
#
showAdsEdit( )
Returns
mixed Gets the corresponding advertisement of the route id passed,
Gets all locations comma from the database and places them comma delimited in a variable for later use.
Authors
Stefano Groenland , Richard Perdaan
|
public
|
|
public
mixed
|
#
showAdsAdd( )
Returns
mixed Makes the reclametoevoegen view.
Author
Richard Perdaan
|
public
Illuminate\Http\RedirectResponse
|
#
addAd( Illuminate\Http\Request $request )
Parameters
Returns
Illuminate\Http\RedirectResponse Grabs all input values from the request, validates them and if all goes well,
The advertisement will be created.
Author
Richard Perdaan & Stefano Groenland
|
public
Illuminate\Http\RedirectResponse
|
#
deleteAd( )
Returns
Illuminate\Http\RedirectResponse Gets the id from the route parameter,
looks for the id in the database. If found the row will be deleted from the Ad table,
Aswell as the linked rows in the AdLocation table.
Author
Richard Perdaan
|
public
Illuminate\Http\RedirectResponse
|
#
editAd( Illuminate\Http\Request $request )
Parameters
Returns
Illuminate\Http\RedirectResponse Uses the route parameter to define which advertisement has to be edited,
Gets all inputs filled in and checks them for validation.
If all passed correctly the advertisement gets updated.
Author
Richard Perdaan & Stefano Groenland
|
public
Illuminate\Http\RedirectResponse|Illuminate\Routing\Redirector
|
#
upload( Illuminate\Http\Request $request, $id, $type )
Parameters
Returns
Illuminate\Http\RedirectResponse|Illuminate\Routing\Redirector Grabs the file named 'banner' from the request and uploads it onto the server,
It updates the corresponding advertisement with the link to the uploaded picture as their banner in the Ad table.
Authors
Stefano Groenland
|
public
string
|
#
getLocationsInRadius( $radius, $lat, $lng )
Parameters
Returns
string Uses the geobyte API for nearby cities in a radius arround the lat & long coords of a given location.
Author
Stefano Groenland
|
public
mixed
|
|
public
array
|
#
geoCode( $adress )
Parameters
Returns
array Uses the Google maps Geocoding API to convert a location to geodata.
Author
Stefano Groenland
|