Laravel ๊ฐ๋ฐ ๋ธ๋์น์ ์ฑ ๋๋ ํ ๋ฆฌ์์ ๊ธฐ๋ณธ ์ฌ์ฉ์ ๋ชจ๋ธ์ ์ฌ์ฉํ ๋ Composer๋ ์ด ์ค๋ฅ ๋ฉ์์ง๋ฅผ ๋์ง ๊ฒ์ ๋๋ค.
ErrorException: Warning: include(/home/george/Documents/Projects/laravel/app/models/user.php): failed to open stream: No such file or directory in /home/george/Documents/Projects/laravel/vendor/composer/ClassLoader.php line 183
๋ชจ๋ธ ํ์ผ ์ด๋ฆ์ User.php
์์ user.php
๋ก ๋ณ๊ฒฝํ์ฌ ํด๊ฒฐํ ์ ์์ต๋๋ค. ํ์ผ๋ช
์ ๋๋ฌธ์๋ก ํ๋ฉด ์๋๋์?
๋ชจ๋ธ์ ๊ธฐ๋ณธ์ ์ผ๋ก ์๋ํฉ๋๋ค. ๋ชจ๋ธ์ ์ฌ์ฉํ ๋ฐฉ๋ฒ์ ๋ํ ์ฝ๋๋ฅผ ๋ถ์ฌ๋ฃ์ผ์ จ์ต๋๊น?
์๋ ํ์ธ์ ํ ์ผ๋ฌ
์ด๊ฒ์ ๋ด๊ฐ ๋ชจ๋ธ์ ์ด๋ป๊ฒ ์ฌ์ฉํ๊ณ ์๋์ง ๋ณด์ฌ์ฃผ๋ ์ปจํธ๋กค๋ฌ์ ๋๋ค.
class LoginController extends BaseController {
public function getIndex()
{
return View::make('login.index');
}
public function postIndex()
{
$user = array('username' => Input::get('username'), 'password' => Input::get('password'));
if(Auth::attempt($user))
{
return Redirect::home();
}
return Redirect::back()->withInput();
}
}
vendor
php composer.phar
install์ ๋ค์ ์คํํ์ฌ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
vendor
php composer.phar
install์ ๋ค์ ์คํํ์ฌ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์์ต๋๋ค.