title: How can i fix " Class 'App\Service' not found "
body: <p>in local host i haven't this problem but in linux host in CPannel i receive this error </p>
  
  <p>Class 'App\Service' not found </p>
  
  <p>it's just an example i have same problem in some models..</p>
  
  <p>my relations doesnt work properly in original host but in local host i haven't got any problem</p>
  
  <p>my models:</p>
  
  <pre><code>&lt;?php
  
  
  namespace App;
  
  use App\Category;
  
  use App\Project;
  
  use App\Service;
  
  use Illuminate\Database\Eloquent\Model;
  
  
  class Category extends Model
  
  {
  
      protected $fillable = [
  
          'title', 'parent_id','title_en',
      ];
  
  
      public function category(){
          return  $this-&gt;hasMany(Category::class,'parent_id');
      }
  
      public function parent(){
          return $this-&gt;category('parent');
      }
  
      public function project(){
          return $this-&gt;belongsToMany(project::class);
      }
  
      public function service(){
          return $this-&gt;belongsToMany(service::class);
      }
  }
  </code></pre>
  
  <p>my controller :</p>
  
  <p>
  
  <pre><code>namespace App\Http\Controllers;
  
  
  use App\Service;
  
  use Illuminate\Http\Request;
  
  
  class ServiceController extends Controller
  {
  
      public function landpage(){
  
          $services=Service::with('cat')-&gt;get();
  
  
          return view('services.index',compact('services'));
      }
  
      public function detail($id){
  
          $services=service::with('cat')-&gt;findOrFail($id);
  
          return view('service_detail.index',compact('services'));
  
      }
  }
  </code></pre>