小编Yas*_*ssa的帖子

如何获取公共目录?

我是初学者,所以请原谅我这个问题是return File::put($path , $data);用来在Laravel上的公共文件夹中创建一个文件.我使用了来自控制器的这段代码,我需要知道$path它应该是什么样的价值.

laravel laravel-4

66
推荐指数
4
解决办法
12万
查看次数

类tableseeder不存在(虽然它确实存在):S

我尝试使用laravel 5.4进行迁移加种子数据库时出现此错误

[ReflectionException]类PostTagTableSeeder不存在

事实上,该文件确实存在正确的类名

种子/ PostTagTableSeeder.php

<?php

use Illuminate\Database\Seeder;
use App\Tag;
use App\Post;

class PostTagTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Model::unguard();
        //DB::table('post_tag')->delete();

        $tag1       = Tag::find(1);
        $tag2       = Tag::find(2);
        $tag3       = Tag::find(3);
        $tag4       = Tag::find(4);
        $post1      = Post::find(1);
        $post2      = Post::find(2);
        $post3      = Post::find(3);
        $post4      = Post::find(4);
        $post5      = Post::find(5);
        $post6      = Post::find(6);
        $post7      = Post::find(7);
        $post8      = Post::find(8);
        $post9      = Post::find(9);
        $post10     = Post::find(10);
        $post11     = Post::find(11); …
Run Code Online (Sandbox Code Playgroud)

php laravel laravel-5.4

11
推荐指数
2
解决办法
6486
查看次数

未定义Auth guard [admin]

您好我是laravel的新手我正在使用管理页面制作管理页面,当我使用admin auth guard但是当我尝试访问管理页面"www.school.dev/admin"时,我看到了这个错误
在此输入图像描述

这是我的config/auth.php

    <?php

return [

/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/

'defaults' => [
    'guard' => 'web',
    'passwords' => 'users',
],

/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, …
Run Code Online (Sandbox Code Playgroud)

php laravel laravel-5.4

8
推荐指数
1
解决办法
3万
查看次数

我如何为galaxy note 5编写媒体查询

对于三星Galaxy note 5,我需要横向和纵向模式的媒体查询代码.我使用以下媒体查询,但我认为这是不对的:

@media only screen and (max-width: 640px) and (orientation : landscape) {}
Run Code Online (Sandbox Code Playgroud)

我错过了什么,或者这是正确的吗?

css css3 media-queries

6
推荐指数
1
解决办法
3680
查看次数

检查数组javascript中是否有字符串

如果我有一个数组,days names我想检查例如sunday- 首字母大写还是小 - 在这个数组中最好的做法是什么?

javascript

5
推荐指数
1
解决办法
2万
查看次数

谷歌地图iframe参数

这是我第一次使用谷歌地图iframe,我迷失了这些参数 geocode , fll , fspn , st , rq , ll , spn

所有这些参数应该与纬度和经度相等..我有json数组检索我的数据位置但我丢失了哪些数据应该发送到每个参数:(

results->geometry->bounds->northeast->lat
results->geometry->bounds->northeast->lng

results->geometry->bounds->southwest->lat
results->geometry->bounds->southwest->lng

results->geometry->location->lat
results->geometry->location->lng

results->geometry->viewport->northeast->lat
results->geometry->viewport->northeast->lng

results->geometry->viewport->southwest->lat
results->geometry->viewport->southwest->lng
Run Code Online (Sandbox Code Playgroud)

javascript google-maps

2
推荐指数
1
解决办法
3万
查看次数

循环中的动态变量名称

我需要在js里面为for循环创建动态变量名

var counter = 0;
for(i=0; i<location.length; i++) {
   ...
   var "marker_" + counter = new google.maps.Marker({
Run Code Online (Sandbox Code Playgroud)

但是,当我期望变量marker_0,marker_1,marker_2,...时,我有这个错误

Error: SyntaxError: missing variable name
Source Code:
          var "marker_" + counter = new google.maps.Marker({ 
Run Code Online (Sandbox Code Playgroud)

javascript

1
推荐指数
1
解决办法
6540
查看次数

Blade正在输出URL编码字符,而不是在花括号内部进行评估

我有一个链接,我使用的route()方法,但它没有得到处理输出链接,它输出一个字符串

<a href="{{ route('admin.index') }}">Dashboard</a>
Run Code Online (Sandbox Code Playgroud)

结果

http://web.app/%7B%7B%20route('admin.index')%20%7D%7D
Run Code Online (Sandbox Code Playgroud)

php laravel laravel-routing laravel-5

1
推荐指数
1
解决办法
434
查看次数