From 61877894fe291efaea76d75bfb663f1596052f40 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 14 Oct 2024 02:23:20 +0800 Subject: [PATCH] change torrent table info_hash nullable --- app/Console/Commands/Test.php | 7 +++-- ...ange_torrents_table_info_hash_nullable.php | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 database/migrations/2024_10_13_035900_change_torrents_table_info_hash_nullable.php diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index f3d14a6a..efce531e 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -100,8 +100,11 @@ class Test extends Command */ public function handle() { - $ip = "116.77.75.254"; - $this->info(inet_pton($ip)); + $ip = "44, +55, +444,65 5 32"; + $result = preg_split("/[\r\n\s,,]+/", trim($ip)); + dd($result); } } diff --git a/database/migrations/2024_10_13_035900_change_torrents_table_info_hash_nullable.php b/database/migrations/2024_10_13_035900_change_torrents_table_info_hash_nullable.php new file mode 100644 index 00000000..1906a12f --- /dev/null +++ b/database/migrations/2024_10_13_035900_change_torrents_table_info_hash_nullable.php @@ -0,0 +1,29 @@ +