Skip to content

Commit

Permalink
Merge pull request #2272 from tklai/laravel-11
Browse files Browse the repository at this point in the history
Add Laravel 11 documentation
  • Loading branch information
simon04 authored Jul 17, 2024
2 parents f4609a1 + a8ed382 commit 2b63419
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/docs/scrapers/laravel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ class Laravel < UrlScraper
Laravel is a trademark of Taylor Otwell.
HTML

version '11' do
self.release = '11.11.1'
self.root_path = '/api/11.x/index.html'
self.initial_paths = %w(/docs/11.x/installation /api/11.x/classes.html)

options[:only_patterns] = [%r{\A/api/11\.x/}, %r{\A/docs/11\.x/}]

options[:fix_urls] = ->(url) do
url.sub! %r{11.x/+}, "11.x/"
url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?![1-9]?\d)}, "#{Laravel.base_url}/docs/11.x/"
url
end
end

version '10' do
self.release = '10.13.0'
self.root_path = '/api/10.x/index.html'
Expand Down

0 comments on commit 2b63419

Please sign in to comment.