title: how to validate image dimension before insert into database in laravel
body: <p>Iam new in laravel .im trying to validate dimensions of image .i want dimensions  minimum(width=100,height=50).iam using validation code in controller.php is here
   'galimg'=>'required|max:200kb|DimensionMin(300,300)|Mimes:jpeg,jpg,gif,png
            ,pneg'<br>
  but DimensionMin(300,300) is not work....i think custom validation rule is possible ..but i dont know how to use it ?and where ?  this is my controller.php code</p>
  
  <pre><code>public function getgallery()
    {
      $validate=Validator::make(Input::all(),array(
      'galname'=&gt;'required|max:20',
       'galimg'=&gt;'required|max:400kb|Dimensionmin(300,300)|Mimes:jpeg,jpg,gif,png
                       ,pneg'));
      if($validate-&gt;fails())
       {  return Redirect::route('getgallery')
          -&gt;withErrors($validate)-&gt;withInput(); }
      else
      { $max_image = 3;
      if(ForumGallery::all()-&gt;count() &lt; $max_image)
       {  $file=Input::file('galimg');
          $filename=$file-&gt;getClientOriginalName();
       $file-&gt;move('uploads',$filename);
       ForumGallery::create(['galname'=&gt;Input::get('galname'),
             'galimg'=&gt;$filename]);
       return Redirect::route('addgallery'); 
        }
      else
       {return Redirect::route('gallery')
        -&gt;with('success','Max Image Upload Reached!');
       } }}
  </code></pre>