It's my store method where I am getting IP through request from my view
public function store(Request $request)
{
$ip['ip_range'] = $request->input('ip_range');
$ip['min_ip'] = $request->input('ip_range');
$ip['max_ip'] = $request->input('ip_range');
$ip_data = Ip::create($ip);
session()->flash('msg', ' Successfully created');
return view('ip.index');
}
In above I want if IP comes as
192.168.2.9
192.168.1.2
It should be saved as 2 values .... Mean it should separate it on /r/n
and where I found /n
I create a new value and so on.
And next thing is that if user enter as
192.168.1.0-3
Here a -
comes at last one 192.168.1-3
should be save in ip_range and 192.168.1.0
in min_ip while 192.168.1.3
as max_ip.