In Laravel 5.1 you must prefix the class name with the global namespace prefix '\'.
So your updated code:
代碼: 選擇全部
<?php
namespace App\Http\Controllers\III_Ranks;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class RanksController extends Controller
{
public function getRanks()
{
$list1 = new \DOMDocument();
//etc...
}
}