当我尝试将slug添加到我的laravel项目时出现错误。
这是我的提供者
Cviebrock\EloquentSluggable\ServiceProvider::class,
这是我的composer.json
"require": {
....
"cviebrock/eloquent-sluggable": "^4.0"
},
这是我的模特
<?php
...
use Cviebrock\EloquentSluggable\SluggableTrait;
class Artikel extends Model
{
....
use Sluggable;
...
public function sluggable()
{
return [
'slug' => [
'source' => 'artikel_judul'
]
];
}
}
答案 0 :(得分:5)
根据docs,它应该是这样的
version: "2"
services:
frontend:
build:
context: .
dockerfile: frontend.dockerfile
args:
- hostuid=${HOST_UID}
- hostgid=${HOST_GID}
ports:
- "8585:8000"
volumes:
- ./code:/srv/frontend
command: grunt