Ejemplo n.º 1
0
 protected function fetchPPTs($dataTag2, $delimiter1, $delimiter2)
 {
     $ppts = [];
     $i = 0;
     foreach ($this->rawHtml->find($dataTag2) as $element) {
         $long_name = $this->textCaptions[$i];
         $dimensions = between($delimiter1, $delimiter2, $long_name);
         $this->_name[$i] = trim(between($delimiter1, $delimiter2, $long_name));
         $this->type[$i] = strtoupper($this->_name[$i]);
         $this->length[$i] = $this->replaceString(trim(str_take(5, $dimensions)));
         $this->width[$i] = $this->replaceString(trim(str_rtake(6, $dimensions)));
         $this->thickness[$i] = NULL;
         $this->_description[$i] = $this->_name[$i] . ' (' . $this->length[$i] . 'X' . $this->width[$i] . ')';
         dd($this->_name[$i], $this->length[$i], $this->width[$i], $this->thickness[$i]);
         $this->remoteImgUrl[$i] = $element->{"data-orig-file"};
         $ext = after_last(".", $this->remoteImgUrl[$i]);
         $this->photoName[$i] = sprintf("%s-%s", time(), create_slug(str_replace(":", "-", $this->_name[$i])) . ".{$ext}");
         $this->photoPath[$i] = sprintf("%s/%s", self::imgBasePath, $this->photoName[$i]);
         $this->photoTPath[$i] = sprintf("%s/tn-%s", self::imgBasePath, $this->photoName[$i]);
         $i++;
     }
 }
Ejemplo n.º 2
0
Route::get('skirting/{name}', 'ProductDisplayController@singleDisplay');
Route::get('wallpanel', 'ProductDisplayController@listProducts')->name('wallpanel');
Route::get('wallpanel/{name}', 'ProductDisplayController@singleDisplay');
Route::group(['prefix' => 'woodfloors'], function () {
    Route::get('neutral', 'ProductDisplayController@neutral')->name('neutral');
    Route::get('neutral/{name}', 'ProductDisplayController@singleNeutral');
    Route::get('style', 'ProductDisplayController@style')->name('style');
    Route::get('style/{name}', 'ProductDisplayController@singleStyle');
    Route::get('wiparquet', 'ProductDisplayController@wiparquet')->name('wiparquet');
    Route::get('wiparquet/{name}', 'ProductDisplayController@singleWiparquet');
    Route::get('extravagant', 'ProductDisplayController@extravagant')->name('extravagant');
    Route::get('extravagant/{name}', 'ProductDisplayController@singleExtravagant');
});
Route::get('set-up', function () {
    $string = "Art: 995-33 (1,06M Х10,05M)";
    echo str_take(5, $string, 13);
    return;
    $take = 3;
    $skip = 2 + 0;
    $skip = $skip + $take - 0;
    echo substr("ABCDEFGHIJ", -$skip, $take);
    return;
    // Category::where('name', 'decopaper')->first()->id;
    $names = [];
    $images = [];
    $data = [];
    $html = file_get_html("http://jabisodagencies.com/decopaper");
    foreach ($html->find('dd[class=wp-caption-text]') as $element) {
        $names[] = trim($element->plaintext);
    }
    $counter = 0;