Merge pull request #1800 from pavel-mironchik/fix-delete-warning
Allow to use custom warning about existing relations in modules.
This commit is contained in:
commit
e5d16fea14
@ -3,6 +3,7 @@
|
|||||||
namespace App\Traits;
|
namespace App\Traits;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Collection;
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
trait Relationships
|
trait Relationships
|
||||||
{
|
{
|
||||||
@ -15,7 +16,8 @@ trait Relationships
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$counter[] = $c . ' ' . strtolower(trans_choice('general.' . $text, ($c > 1) ? 2 : 1));
|
$text = Str::contains($text, '::') ? $text : 'general.' . $text;
|
||||||
|
$counter[] = $c . ' ' . strtolower(trans_choice($text, ($c > 1) ? 2 : 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $counter;
|
return $counter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user