μλ
!
1λ
λκ² laravel 4.2λ₯Ό μ€ννλ νλ‘μ νΈκ° μμ΅λλ€.
μ΄λ² μ£Όμ 5.0μ μ¬μ©ν λ€μ 5.1μ μ¬μ©νλλ‘ μ
κ·Έλ μ΄λ νλ‘μΈμ€λ₯Ό μμνμΌλ©° κΆκ·Ήμ μΌλ‘ 5.2λ₯Ό λͺ©νλ‘ νκ³ μμ΅λλ€.
5.0 μ
κ·Έλ μ΄λλ μ λμκ³ μ΄ μΊμ± λ¬Έμ λ₯Ό μ μΈνκ³ λ λͺ¨λ κ²μ΄ μλ²½νκ² μλνμ΅λλ€.
μ²μμλ "5.1λ‘ μ
κ·Έλ μ΄λνκ³ μλνλμ§ νμΈνμ"λΌκ³ μκ°νμ§λ§ κ·Έλ μ§ μμμ΅λλ€.
μΊμλ₯Ό μμ±νκ³ μ΄ μμΈκ° λ°μνλ μ₯μΈ λͺ λ Ήμ μ¬μ©ν©λλ€.
Refreshing the message cache...
[InvalidArgumentException]
Cache store [] is not defined.
μ²μμλ μ€μΉ λ¬Έμ λΌκ³ μκ°νμ΅λλ€. laravel 곡μ λ¬Έμ κ°μ΄λμ λ°λΌ μ²μλΆν° λͺ¨λ κ²μ λ€μ μ€μΉνμ΅λλ€. λͺ¨λ κ΅¬μ± λ±μ λ λ² νμΈνμ΅λλ€. νμ§λ§ μ¬μ ν μ΄ λ¬Έμ κ° μμ΅λλ€.
μ¬μμ°/λμμ΄ λ μ μλ μ λ³΄κ° μμ΅λλ€.
μ곑κ°.json μ½ν μΈ :
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "5.1.*",
"illuminate/html": "5.*",
"andywer/js-localization": "dev-laravel-5",
"laracasts/flash" : "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database",
"app/Models",
"app/Http/Controllers"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php -r \"copy('.env.example', '.env');\"",
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
_cache.php_ μ€μ νμΌ:
<?php
return array(
/*
|--------------------------------------------------------------------------
| Default Cache Driver
|--------------------------------------------------------------------------
|
| This option controls the default cache "driver" that will be used when
| using the Caching library. Of course, you may use other drivers any
| time you wish. This is the default when another is not specified.
|
| Supported: "file", "database", "apc", "memcached", "redis", "array"
|
*/
'driver' => 'file',
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => 'mysql',
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache'),
],
'memcached' => [
'driver' => 'memcached',
'servers' => [
[
'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
'prefix' => 'laravel',
);
μ΄ λ¬Έμ λ₯Ό μ€λͺ νκΈ° μν΄ λ΄ ν νμ΄μ§μμ κ°λ¨ν μΊμ μ¬μ© μ¬λ‘λ₯Ό μλνμ΅λλ€.
public function index()
{
Cache::put('toto', 'titi', 1);
$value = Cache::get('toto');
return View::make('pages.accueil');
}
λ€μμ λΈλΌμ°μ μμ μ»μ νΈμΆ μ€νμ λλ€(λ΄ νμΌμμ μ λ¬λλ μμΉλ₯Ό μλΌλ λλ€).
Whoops, looks like something went wrong.
1/1
InvalidArgumentException in CacheManager.php line 93:
Cache store [] is not defined.
in CacheManager.php line 93
at CacheManager->resolve(null) in CacheManager.php line 77
at CacheManager->get(null) in CacheManager.php line 55
at CacheManager->store() in CacheManager.php line 318
at CacheManager->__call('put', array('toto', 'titi', '1')) in Facade.php line 222
at CacheManager->put('toto', 'titi', '1') in Facade.php line 222
at Facade::__callStatic('put', array('toto', 'titi', '1')) in AccueilController.php line 13
at Cache::put('toto', 'titi', '1') in AccueilController.php line 13
at AccueilController->index()
λꡬλ μ§ μ΄λ―Έ μ΄λ° μ’
λ₯μ λ²κ·Έμ μ§λ©΄νκ±°λ μλν λ°©λ²μ΄ μμ΅λκΉ?
νμν κ²½μ° λ ꡬ체μ μΈ μΈλΆ μ 보λ₯Ό μ 곡ν μ μμ΅λλ€. =)
ν¬λΌμ μ§λ¬Ένμμμ€.
μκ² μ΅λλ€. μ κ° μ λ§ λ°λ³΄μΈ κ² κ°μμ. λκ΅°κ°κ° λμ²λΌ μ΄ "λ«"μ λΉ μ§ κ²½μ° μ루μ μ κ²μνκΈ°λ§ νλ©΄ λ©λλ€.
"driver" => "file"
μ
λλ€."default" => "file"
μ
λλ€.λ§μ΄κ·Έλ μ΄μ
νλ λμ μ ν€/ꡬμ±μ νμΈνκΈ° μν΄ ν€λ³λ‘ κ΅¬μ± μ½ν
μΈ λ₯Ό λ³κ²½νμ§λ§ μ΄ μΈλΆ μ 보λ₯Ό λμ³€μ΅λλ€. κ·Έλμ "default" => "file"
λμ "driver" => "file"
λ₯Ό 5.1μ κ°μ§κ³ μμμ΅λλ€.
3λ νμλ μ¬λ°λ₯Έ μΈμκ° μ 곡λμλμ§ νμΈνκΈ° μν΄ .env νμΌμ λ€μ νμΈνμμμ€.
κ°μ₯ μ μ©ν λκΈ
μκ² μ΅λλ€. μ κ° μ λ§ λ°λ³΄μΈ κ² κ°μμ. λκ΅°κ°κ° λμ²λΌ μ΄ "λ«"μ λΉ μ§ κ²½μ° μ루μ μ κ²μνκΈ°λ§ νλ©΄ λ©λλ€.
"driver" => "file"
μ λλ€."default" => "file"
μ λλ€.λ§μ΄κ·Έλ μ΄μ νλ λμ μ ν€/ꡬμ±μ νμΈνκΈ° μν΄ ν€λ³λ‘ κ΅¬μ± μ½ν μΈ λ₯Ό λ³κ²½νμ§λ§ μ΄ μΈλΆ μ 보λ₯Ό λμ³€μ΅λλ€. κ·Έλμ
"default" => "file"
λμ"driver" => "file"
λ₯Ό 5.1μ κ°μ§κ³ μμμ΅λλ€.