SET earth_radius = 6371.009;
SET axis = (SIN(RADIANS(lat2-lat1)/2) * SIN(RADIANS(lat2-lat1)/2) +
COS(RADIANS(lat1)) * COS(RADIANS(lat2)) *
SIN(RADIANS(long2-long1)/2) * SIN(RADIANS(long2-long1)/2));
SET distance = earth_radius * (2 * ATN2(SQRT(axis), SQRT(1-axis)));
RETURN ROUND(distance, 3);
Route::get('/videos/{filename}', function($filename){
$file = Storage::get('videos/'.$filename);
$mimetype = Storage::mimeType('videos/'.$filename);
return response($file, 200)->header('Content-Type', $mimetype);
});
<form action="{{ Route('car.store') }}" method="post">
class Car extends Model
{
protected $table = 'cars';
protected $fillable = ['car'];
}
protected $fillable = ['car', 'mark', 'color', 'age', 'power'];
public function route(array $params = [], $absolute_url = true) {
$params = array_diff($params, ['', null]);
return route('frontend.articles', array_replace($params, ['prefix' => App::getLocale()]), $absolute_url);
}