public function testFlip() { $data = new Collection(['name' => 'taylor', 'framework' => 'laravel']); $this->assertEquals(['taylor' => 'name', 'laravel' => 'framework'], $data->flip()->toArray()); }
/** * Determine the locale from the current host. * * @param \Illuminate\Http\Request $request * @return string */ public function determineLocale(Request $request) { return $this->hostMapping->flip()->get($request->getHost(), $this->fallback); }