Questions tagged «laravel-5.1»

12
laravel 5:找不到类“输入”
在我的routes.php文件中,我有: Route::get('/', function () { return view('login'); }); Route::get('/index', function(){ return view('index'); }); Route::get('/register', function(){ return view('register'); }); Route::post('/register',function(){ $user = new \App\User; $user->username = input::get('username'); $user->email = input::get('email'); $user->password = Hash::make(input::get('username')); $user->designation = input::get('designation'); $user->save(); }); 我有一张用户注册表格。我也采用形式输入值routes.php。 但是当我注册用户时出现错误。错误: FatalErrorException in routes.php line 61: Class 'input' not found

5
Laravel 5应用程序密钥
我是Laravel的新手。我今晚才开始。实际上,我有以下代码: 'key' => env('APP_KEY', 'SomeRandomString'), 在xampp / htdocs / laravel / blog / config / app.php中。 我想通过cmd将密钥更改为32位,如下所示: xampp\htdocs\laravel/blog>php artisan key:generate 它会生成密钥,但无法在xampp / htdocs / laravel / blog / config / app.php中进行替换/更新。

3
如何使用Laravel 5.1执行原始查询?
因此,我有一个很小的查询可以在我的数据库上运行,并且在MySQL Workbench中可以正常工作。基本上,再次使用带有左联接的SELECT和带有左联接的UNION。 SELECT cards.id_card, cards.hash_card, cards.`table`, users.name, 0 as total, cards.card_status, cards.created_at FROM cards LEFT JOIN users ON users.id_user = cards.id_user WHERE hash_card NOT IN ( SELECT orders.hash_card FROM orders ) UNION SELECT cards.id_card, orders.hash_card, cards.`table`, users.name, sum(orders.quantity*orders.product_price) as total, cards.card_status, max(orders.created_at) FROM menu.orders LEFT JOIN cards ON cards.hash_card = …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.