8000 fix and update postman collection · thaivanan/Laravel-API-Server@1cf7075 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1cf7075

Browse files
committed
fix and update postman collection
1 parent 91aba1d commit 1cf7075

File tree

3 files changed

+69
-6
lines changed

3 files changed

+69
-6
lines changed

LARAVEL API JUEGOS.postman_collection.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,72 @@
517517
"response": []
518518
}
519519
]
520+
},
521+
{
522+
"name": "Generos",
523+
"item": [
524+
{
525+
"name": "Get all generos",
526+
"request": {
527+
"method": "GET",
528+
"header": [],
529+
"url": {
530+
"raw": "https://laravelapijuegos.herokuapp.com/api/juegos/generos/show/all",
531+
"protocol": "https",
532+
"host": [
533+
"laravelapijuegos",
534+
"herokuapp",
535+
"com"
536+
],
537+
"path": [
538+
"api",
539+
"juegos",
540+
"generos",
541+
"show",
542+
"all"
543+
],
544+
"query": [
545+
{
546+
"key": "",
547+
"value": "",
548+
"disabled": true
549+
}
550+
]
551+
}
552+
},
553+
"response": []
554+
},
555+
{
556+
"name": "Get juegos generos",
557+
"request": {
558+
"method": "GET",
559+
"header": [],
560+
"url": {
561+
"raw": "https://laravelapijuegos.herokuapp.com/api/juegos/generos/carreras",
562+
"protocol": "https",
563+
"host": [
564+
"laravelapijuegos",
565+
"herokuapp",
566+
"com"
567+
],
568+
"path": [
569+
"api",
570+
"juegos",
571+
"generos",
572+
"carreras"
573+
],
574+
"query": [
575+
{
576+
"key": "",
577+
"value": "",
578+
"disabled": true
579+
}
580+
]
581+
}
582+
},
583+
"response": []
584+
}
585+
]
520586
}
521587
]
522588
}

app/Models/Base.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
namespace App\Models;
44

55
use Illuminate\Database\Eloquent\Model;
6+
use Illuminate\Support\Str;
67

78
class Base extends Model
89
{
910
public function sluggable($string)
1011
{
11-
$slug = substr($string, 0, 140);
12-
$slug = strtr($slug, " _ÀÁÂÃÄÅÆàáâãäåæÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñÞßÿý", "--aaaaaaaaaaaaaaoooooooooooooeeeeeeeeecceiiiiiiiiuuuuuuuunntsyy");
13-
$slug = strtolower($slug);
14-
$slug = preg_replace("/[^a-z0-9\-.]/", "", $slug);
15-
return str_replace("--", "-", $slug);
12+
return Str::slug($string);
1613
}
1714

1815
public function findById($id) {

database/seeds/GeneroSeeder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public function run()
385385

386386
DB::table('generos')->insert([
387387
'nombre' => 'Survival Horror',
388-
'slug' => 'Survival Horror',
388+
'slug' => 'survival Horror',
389389
]);
390390

391391
DB::table('generos')->insert([

0 commit comments

Comments
 (0)
0