Browse Source

Fix tags

pull/282/head
Kode 6 years ago
parent
commit
a4107cba25
  1. 6
      app/Http/Controllers/TagController.php
  2. 1
      resources/lang/en/app.php

6
app/Http/Controllers/TagController.php

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Item; use App\Item;
use App\User;
use DB; use DB;
class TagController extends Controller class TagController extends Controller
@ -62,10 +63,13 @@ class TagController extends Controller
$slug = str_slug($request->title, '-'); $slug = str_slug($request->title, '-');
$current_user = User::currentUser();
// set item type to tag // set item type to tag
$request->merge([ $request->merge([
'type' => '1', 'type' => '1',
'url' => $slug 'url' => $slug,
'user_id' => $current_user->id
]); ]);
//die(print_r($request->all())); //die(print_r($request->all()));
Item::create($request->all()); Item::create($request->all());

1
resources/lang/en/app.php

@ -75,6 +75,7 @@ return [
'apps.tags' => 'Tags', 'apps.tags' => 'Tags',
'apps.override' => 'If different to main url', 'apps.override' => 'If different to main url',
'apps.preview' => 'Preview', 'apps.preview' => 'Preview',
'apps.apptype' => 'Application Type',
'user.user_list' => 'Users', 'user.user_list' => 'Users',
'user.add_user' => 'Add user', 'user.add_user' => 'Add user',

Loading…
Cancel
Save