Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

33 Stron V   1 2 3 > » 

northwest
Napisane: 3.02.2022, 00:18:47





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Poproszę o szczegóły na priv smile.gif
  Forum: Poszukuję · Podgląd postu: #1257930 · Odpowiedzi: 2 · Wyświetleń: 466

northwest
Napisane: 24.09.2019, 13:28:23





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Mówimy o użytkowniku. Czyli adres, rok urodzenia, telefon, mail, opis itp.

Zastanawiam się czy lepiej zrobić to w 1 tabeli, czy w tabeli pomocniczej (key-value)?
  Forum: Przedszkole · Podgląd postu: #1245985 · Odpowiedzi: 4 · Wyświetleń: 318

northwest
Napisane: 23.09.2019, 22:32:07





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witajcie.
Mam tabele USERS składającą się z:
- id
- login
- password

Potrzebuję dodać teraz pola: wiek, miasto, ulica, kod pocztowy etc. W sumie ok 30 kolumn.

W jaki sposób najlepiej to zrobić? Jako dodatkowe kolumny w tabeli USERS?
  Forum: Przedszkole · Podgląd postu: #1245835 · Odpowiedzi: 4 · Wyświetleń: 318

northwest
Napisane: 19.06.2019, 16:40:19





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.
Mam mapkę w Open Street Maps: http://serwer1356363.home.pl/pub/test/mapa.html
Podgląd: https://ibb.co/x8mqR62


Mój kod wygląda następująco:
  1.  
  2. <script type="text/javascript">
  3.  
  4. function onLocationFound(e) {
  5. var radius = e.accuracy / 2;
  6. lat = e.latlng.lat;
  7. lng = e.latlng.lng;
  8.  
  9. L.marker(e.latlng).addTo(map).bindPopup("Tutaj jesteś!!!");
  10. //L.circle(e.latlng, radius).addTo(map);
  11.  
  12. map.setView([lat, lng], 12);
  13. }
  14.  
  15. function onLocationError(e) {
  16. //alert(e.message);
  17. console.log(e.message);
  18. }
  19.  
  20.  
  21. var map = L.map('mapdiv', {
  22. editable: true,
  23. fadeAnimation: false
  24. }).setView([54.35070881441067, 18.641191756395074], 12);
  25. L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
  26. // L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
  27. attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',
  28. maxZoom: 18, zoomControl: true, detectRetina: true
  29. }).addTo(map);
  30.  
  31.  
  32.  
  33.  
  34.  
  35. let myFilter = ['grayscale:100%'];
  36.  
  37. let myTileLayer = L.tileLayer.colorFilter('https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png', {
  38. attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
  39. filter: myFilter,
  40. }).addTo(map);
  41.  
  42.  
  43. // lc = L.control.locate({
  44. // strings: {
  45. // title: "Pokaż gdzie jestem"
  46. // }
  47. // }).addTo(map);
  48.  
  49.  
  50. var LeafIcon = L.Icon.extend({
  51. options: {
  52. iconSize: [25, 29],
  53. iconAnchor: [25, 29],
  54. popupAnchor: [-12, -22]
  55. }
  56. });
  57.  
  58.  
  59. L.icon = function (options) {
  60. return new L.Icon(options);
  61. };
  62.  
  63.  
  64. var icons = {
  65. greenIcon: new LeafIcon({iconUrl: '{{asset('assets/images/ikon19.png')}}'}),
  66. redIcon: new LeafIcon({iconUrl: '{{asset('assets/images/ikon20.png')}}'}),
  67. blackIcon: new LeafIcon({iconUrl: '{{asset('assets/images/ikon20.png')}}'})
  68. }
  69.  
  70.  
  71. var image = '';
  72. $.ajax({
  73. url: '{{url('/getPointForMap')}}',
  74. method: 'get',
  75. cache: false,
  76. success: function (data) {
  77. $.each(JSON.parse(data), function(i, poi) {
  78. if (poi.photo != ''){
  79. image = '<img src="'+poi.photo+'" class="mapImgF"><br/>';
  80. }
  81. L.marker([poi.lat, poi.lng], {icon: icons[poi.marker]}).addTo(map).addTo(map).bindPopup('<a href="'+poi.url+'">' + image + '<div class="mapTitleF">' + poi.name + '</div>' + '<div class="mapDescF"> ocena: ' + poi.score + '<br/>' + poi.price + ' </div></a>', {maxWidth: "auto", closeOnClick: true});
  82. });
  83. }
  84. });
  85.  
  86. map.on('locationfound', onLocationFound);
  87. map.on('locationerror', onLocationError);
  88. map.locate({setView: true, maxZoom: 18});
  89.  
  90. </script>
  91.  
  92. <style type="text/css">
  93. #mapdiv {
  94. height: 600px;
  95. width:100%;
  96. }
  97.  
  98. </style>




W jaki sposób można naprawić to szare tło?
  Forum: Przedszkole · Podgląd postu: #1242836 · Odpowiedzi: 1 · Wyświetleń: 249

northwest
Napisane: 12.06.2019, 09:54:38





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.
Zaczynam przygodę z Laravelem i natrafiłem na mały problem sad.gif
Wykorzystuję w moim projekcie Laravel 5.8.

Mam działający kod wyświetlający listę użytkowników.

Mój kod wygląda następująco:


Users:
  1. class User extends Authenticatable implements MustVerifyEmail
  2. {
  3. use Notifiable;
  4. use psCMS\Presenters\UserPresenter;
  5.  
  6. public static $roles = [];
  7.  
  8. protected $fillable = ['user_height', 'year_birth', 'company_id', 'enable', 'name', 'surname', 'email', 'email_verified_at', 'password', 'counter', 'url_address', 'isCompany', 'isMailing', 'content', 'nip1', 'business1', 'phone1', 'street1', 'number1', 'postal_code1', 'city1', 'country_id1', 'provincial_id1', 'nip2', 'business2', 'phone2', 'street2', 'number2', 'postal_code2', 'city2', 'country_id2', 'provincial_id2', 'nip3', 'business3', 'phone3', 'street3', 'number3', 'postal_code3', 'city3', 'country_id3', 'provincial_id3', 'cash', 'lng', 'lat', 'enable_map', 'remember_token', 'created_at', 'updated_at', 'last_login_at', 'last_login_ip'];
  9.  
  10. protected $hidden = [
  11. 'password', 'remember_token',
  12. ];
  13.  
  14.  
  15. public function roles()
  16. {
  17. return $this->belongsToMany('App\Role');
  18. }
  19.  
  20. public function mainRole()
  21. {
  22. return $this->hasOne('App\Role');
  23. }
  24.  
  25. }
  26.  
  27.  
  28.  
  29. Schema::create('users', function (Blueprint $table) {
  30. $table->bigIncrements('id');
  31. $table->bigInteger('company_id')->unsigned();
  32. $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
  33. $table->boolean('enable')->default(0);
  34. $table->string('name', 120)->nullable();
  35. $table->string('surname', 120)->nullable();
  36. $table->string('email', 120)->unique();
  37. $table->timestamp('email_verified_at')->nullable();
  38. $table->string('password');
  39. $table->bigInteger('counter')->default(0);
  40. $table->string('url_address', 160);
  41. $table->boolean('isCompany')->default(0);
  42. $table->boolean('isMailing')->default(0);
  43. $table->text('content')->nullable();
  44. $table->string('nip1', 12)->nullable();
  45. $table->string('business1', 120)->nullable();
  46. $table->string('phone1', 60)->nullable();
  47. $table->string('street1', 150)->nullable();
  48. $table->string('number1', 8)->nullable();
  49. $table->string('postal_code1', 12)->nullable();
  50. $table->string('city1', 100)->nullable();
  51. $table->bigInteger('country_id1')->default(0);
  52. $table->bigInteger('provincial_id1')->default(0);
  53. $table->string('nip2', 12)->nullable();
  54. $table->string('business2', 120)->nullable();
  55. $table->string('phone2', 60)->nullable();
  56. $table->string('street2', 150)->nullable();
  57. $table->string('number2', 8)->nullable();
  58. $table->string('postal_code2', 12)->nullable();
  59. $table->string('city2', 100)->nullable();
  60. $table->bigInteger('country_id2')->default(0);
  61. $table->bigInteger('provincial_id2')->default(0);
  62. $table->string('nip3', 12)->nullable();
  63. $table->string('business3', 120)->nullable();
  64. $table->string('phone3', 60)->nullable();
  65. $table->string('street3', 150)->nullable();
  66. $table->string('number3', 8)->nullable();
  67. $table->string('postal_code3', 12)->nullable();
  68. $table->string('city3', 100)->nullable();
  69. $table->bigInteger('country_id3')->default(0);
  70. $table->bigInteger('provincial_id3')->default(0);
  71. $table->decimal('cash', 9, 2)->default(0);
  72. $table->decimal('lng', 10, 8)->default(0);
  73. $table->decimal('lat', 10, 8)->default(0);
  74. $table->boolean('enable_map')->default(0);
  75. $table->integer('year_birth')->default(date("Y"));
  76. $table->integer('user_height')->default(0);
  77. $table->rememberToken();
  78. $table->timestamps();
  79. $table->engine = "InnoDB";
  80. });


Services:
  1. class UsersServices extends Model
  2. {
  3. protected $quarded = [];
  4. protected $fillable = ['name', 'type', 'enable'];
  5. public $timestamps = false;
  6. }
  7.  
  8. Schema::create('users_services', function (Blueprint $table) {
  9. $table->bigIncrements('id');
  10. $table->string('name', 100);
  11. $table->integer('type');
  12. $table->boolean('enable')->default(0);
  13. $table->engine = "InnoDB";
  14. });
  15.  


WYbrane/świadczone przez użytkownika usługi:

  1. Schema::create('users_services_selected', function (Blueprint $table) {
  2. $table->bigInteger('user_id')->unsigned();
  3. $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
  4. $table->bigInteger('service_id')->unsigned();
  5. $table->foreign('service_id')->references('id')->on('users_services')->onDelete('cascade');
  6. $table->engine = "InnoDB";
  7. });
  8.  
  9. class UserServicesSelected extends Model
  10. {
  11. protected $quarded = [];
  12. protected $fillable = ['user_id', 'service_id'];
  13. protected $table = 'users_services_selected';
  14. public $timestamps = false;
  15. }
  16.  


Moja aktualna funkcja do wyświetlania użytkowników



  1. public function getUserList(string $query, string $sortColumn, string $sortMethod)
  2. {
  3. if ($query != "" || $sortMethod !="") { echo "$sortColumn, $sortMethod";
  4. return User::ofRoleType(['user', 'userPremium', 'userSponsor'])
  5. ->where(function ($q) use ($query, $sortColumn, $sortMethod) {
  6. $q->where('account_paid_for', '>=', date("Y-m-d"))
  7. ->where('enable', '=', 1)
  8. ->where('email_verified_at', '<>', null)
  9. ->orderBy($sortColumn, $sortMethod);
  10. })->orderBy($sortColumn, $sortMethod)->paginate(15);
  11. } else {
  12. return User::ofRoleType(['user', 'userPremium', 'userSponsor'])
  13. ->where('account_paid_for', '>=', date("Y-m-d"))
  14. ->where('enable', '=', 1)
  15. ->where('email_verified_at', '<>', null)
  16. ->orderBy(DB::raw('IF(premium_for > CURDATE(), 0, 1)'))
  17. ->orderBy('hits', 'DESC')
  18. ->paginate(15);
  19.  
  20. }
  21. }
  22.  


Formatka do wyszukiwania:

  1. <form method="get" action="{{ route('result') }}">
  2. Wiek od <input type="text" name="s_year_birth_from" value=""></div>
  3. Wiek do <input type="text" name="s_year_birth_to" value=""></div>
  4.  
  5.  
  6. Wzrost użytkownika:
  7. Pokaż wszystko: <input type="checkbox" value="0" name="s_height[]">
  8. 150 cm: <input type="checkbox" value="1" name="s_height[]">
  9. 151-160 cm: <input type="checkbox" value="2" name="s_height[]">
  10. 161-170 cm: <input type="checkbox" value="3" name="s_height[]">
  11. 171-180 cm: <input type="checkbox" value="4" name="s_height[]">
  12. >180 cm: <input type="checkbox" value="5" name="s_height[]">
  13.  
  14.  
  15. Usługi:
  16. Pokaż wszystko: <input type="checkbox" value="0" name="s_services1[]">
  17. @foreach($services as $service)
  18. {{ $service->name }} <input type="checkbox" value="{{ $service->id }}" name="s_services1[]">
  19. @endforeach
  20.  
  21. <button type="submit">Szukaj</button>
  22. </form>
  23.  




Wzrost użytkownika = User->user_height

Data urodzenia użytkownika = User->year_birth


Potrzebuję dorobić nowe opcje wyszukiwania:

1. Wyświetlanie użytkowników posiadających odpowiedni wiek w oparciu o: s_year_birth_from i s_year_birth_to (User-> year_birth)

2. Wyświetlanie użytkowników oferujących zaznaczone w wyszukiwarce usługi (zaznaczone / oferowane usługi = UserServicesSelected)

3. Wyświetlanie użytkowników posiadających odpowiedni wzrost w oparciu o: s_height (User->user_height)


Jak można to zrobić? Chciałbym to dodać to do mojej obecnej funkcji wyświetlającej użytkowników: getUserList


Bardzo proszę o pomoc.

  Forum: Gotowe rozwiązania · Podgląd postu: #1242604 · Odpowiedzi: 1 · Wyświetleń: 6 709

northwest
Napisane: 5.06.2019, 19:21:08





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.

Mam pytanie do systemu logowania w Laravelu (wykorzystuje 5.8).

Dodałem standardowe logowanie za pomocą:
  1. php artisan make:auth


I teraz mam pod domena.pl/register i domena.pl/register mam system rejestracji logowania.
To działa mi poprawnie.

Chciałbym na stronie głównej (czyli w domana.pl) dodać dodatkowy formularz logowania.

Zrobiłem taki formularz na stronie głównej:

  1. <form method="POST" action="http://domana.pl/login" id="registration_form">
  2. <input type="hidden" name="_token" value="RLRmSgFz3TrhXp7exjAzCDABf3OCErbf5DvxKCNI">
  3. <input type="email" name="email" placeholder="Login" required>
  4. <input type="password" name="password" placeholder="Hasło" required>
  5. <button type="submit" >Zaloguj</button>
  6. </form>


Jednak po wysłaniu tego tego formularza nie następuje logowanie, a strona wraca na stronę główną.
Wie ktoś jak to naprawić? smile.gif
  Forum: Przedszkole · Podgląd postu: #1242396 · Odpowiedzi: 2 · Wyświetleń: 219

northwest
Napisane: 4.06.2019, 10:04:44





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witajcie,
Jestem początkujący z Laravelem i mam parę pytań smile.gif

1. Jeśli robię tradycyjny upload dla plików w Laravelu - zdjęcia etc - to dlaczego lepiej trzymać je w STORAGE - a nie public?

2. Czy po instalacji na home/ovh/mydevil/hitme pliki z STORAGE będą widoczne dla strony (zrobiłem simlinka php project1/artisan storage:link )?
Zdaję sobie sprawę że bezpieczniej trzymać w STORAGE - tylko obawiam się ewentualnych problemów z hostingiem smile.gif

Macie może jakieś sugestie co do konfiguracji strony na powyższych hostingach?


3. Home ma układ katalogów następujący:
domana.com.pl / public_html /

Pliki strony kopiujemy do domena.com.pl - a zawartość katalogu PUBLIC (z Laravela) kopiujemy do public_html ?


Z góry dziękuję za pomoc smile.gif
  Forum: Przedszkole · Podgląd postu: #1242345 · Odpowiedzi: 0 · Wyświetleń: 292

northwest
Napisane: 31.05.2019, 22:28:50





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.

Od jakiegoś czasu uczę się Laravela i próbuję zintegrować swój projekt z: https://github.com/UniSharp/laravel-filemanager

Mam taki kod - filesystem disk:
  1. 'upload' => [
  2. 'driver' => 'local',
  3. 'root' => public_path('upload'),
  4. 'url' => env('APP_URL').'/upload',
  5. ],
  6.  


LFM.php

  1. return [
  2.  
  3.  
  4. 'use_package_routes' => true,
  5.  
  6.  
  7.  
  8. 'allow_multi_user' => false,
  9.  
  10. 'allow_share_folder' => false,
  11.  
  12.  
  13. 'files_dir' => '',
  14.  
  15.  
  16.  
  17. 'folder_categories' => [
  18. 'file' => [
  19. 'folder_name' => 'txt///',
  20. 'startup_view' => 'grid',
  21. 'max_size' => 50000, // size in KB
  22. 'valid_mime' => [
  23. 'image/jpeg',
  24. 'image/pjpeg',
  25. 'image/png',
  26. 'image/gif',
  27. 'image/svg+xml',
  28. ],
  29. ],
  30. 'image' => [
  31. 'folder_name' => 'photos',
  32. 'startup_view' => 'list',
  33. 'max_size' => 50000, // size in KB
  34. 'valid_mime' => [
  35. 'image/jpeg',
  36. 'image/pjpeg',
  37. 'image/png',
  38. 'image/gif',
  39. 'image/svg+xml',
  40. 'application/pdf',
  41. 'text/plain',
  42. ],
  43. ],
  44. ],
  45.  
  46.  
  47.  
  48. 'disk' => 'upload',
  49.  
  50. 'rename_file' => false,
  51.  
  52. 'alphanumeric_filename' => true,
  53.  
  54. 'alphanumeric_directory' => true,
  55.  
  56. 'should_validate_size' => false,
  57.  
  58. 'should_validate_mime' => true,
  59.  
  60. 'create_folder_mode' => 0755,
  61.  
  62. 'create_file_mode' => 0644,
  63.  
  64. 'should_change_file_mode' => true,
  65.  
  66. 'over_write_on_duplicate' => false,
  67.  
  68.  
  69. 'raster_mimetypes' => [
  70. 'image/jpeg',
  71. 'image/pjpeg',
  72. 'image/png',
  73. ],
  74.  
  75. 'thumb_img_width' => 200,
  76.  
  77. 'thumb_img_height' => 200,
  78.  
  79.  
  80.  
  81. 'resize_aspectRatio' => true,
  82.  
  83. 'resize_containment' => true,
  84.  
  85.  
  86.  
  87. 'file_type_array' => [
  88. 'pdf' => 'Adobe Acrobat',
  89. 'doc' => 'Microsoft Word',
  90. 'docx' => 'Microsoft Word',
  91. 'xls' => 'Microsoft Excel',
  92. 'xlsx' => 'Microsoft Excel',
  93. 'zip' => 'Archive',
  94. 'gif' => 'GIF Image',
  95. 'jpg' => 'JPEG Image',
  96. 'jpeg' => 'JPEG Image',
  97. 'png' => 'PNG Image',
  98. 'ppt' => 'Microsoft PowerPoint',
  99. 'pptx' => 'Microsoft PowerPoint',
  100. ],
  101.  
  102. 'file_icon_array' => [
  103. 'pdf' => 'fa-file-pdf-o',
  104. 'doc' => 'fa-file-word-o',
  105. 'docx' => 'fa-file-word-o',
  106. 'xls' => 'fa-file-excel-o',
  107. 'xlsx' => 'fa-file-excel-o',
  108. 'zip' => 'fa-file-archive-o',
  109. 'gif' => 'fa-file-image-o',
  110. 'jpg' => 'fa-file-image-o',
  111. 'jpeg' => 'fa-file-image-o',
  112. 'png' => 'fa-file-image-o',
  113. 'ppt' => 'fa-file-powerpoint-o',
  114. 'pptx' => 'fa-file-powerpoint-o',
  115. ],
  116.  
  117. 'php_ini_overrides' => [
  118. 'memory_limit' => '256M',
  119. ],
  120. ];
  121.  


Chciałbym uploadować pliki do katalogu:
public/upload/txt.

Kiedy uploaduje pliki to są zapisywane pod taką lokalizacją:
public/upload/txt/http//project1/upload/txt/

(jest błędna ścieżka)


Wie ktoś może co jest nie tak?
  Forum: Przedszkole · Podgląd postu: #1242283 · Odpowiedzi: 1 · Wyświetleń: 331

northwest
Napisane: 26.05.2019, 14:07:27





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witajcie,
Mam taki kod:

  1.  
  2. <ul>
  3. <li class="file-id-46">- <a
  4. href="http://test.test/upload/other/1c186a1229c8c502c9bae2794b52a6f0.pdf"
  5. target="_blank">upload/other/1c186a1229c8c502c9bae2794b52a6f0.pdf</a>
  6. <a href="#" class="red removeThisFile"
  7. id="46">[delete file]</a>
  8. </li>
  9. <li class="file-id-47">- <a
  10. href="http://test.test/upload/other/65b13b47f09fc785d901e43e7864bab2.pdf"
  11. target="_blank">upload/other/65b13b47f09fc785d901e43e7864bab2.pdf</a>
  12. <a href="#" class="red removeThisFile"
  13. id="47">[delete file]</a>
  14. </li>
  15. <li class="file-id-48">- <a
  16. href="http://test.test/upload/other/19846324513791f79013fb8e5a7854d8.pdf"
  17. target="_blank">upload/other/19846324513791f79013fb8e5a7854d8.pdf</a>
  18. <a href="#" class="red removeThisFile"
  19. id="48">[delete file]</a>
  20. </li>
  21. <li class="file-id-49">- <a
  22. href="http://test.test/upload/other/fca69b7c02ae223cd167202368d3a555.pdf"
  23. target="_blank">upload/other/fca69b7c02ae223cd167202368d3a555.pdf</a>
  24. <a href="#" class="red removeThisFile"
  25. id="49">[delete file]</a>
  26. </li>
  27. <li class="file-id-50">- <a
  28. href="http://test.test/upload/other/2a1f88cd9f223a423a29594be3d8ce7a.pdf"
  29. target="_blank">upload/other/2a1f88cd9f223a423a29594be3d8ce7a.pdf</a>
  30. <a href="#" class="red removeThisFile"
  31. id="50">[delete file]</a>
  32. </li>
  33. <li class="file-id-51">- <a
  34. href="http://test.test/upload/other/dbe585a9716bd417437be6b0d5695a6a.pdf"
  35. target="_blank">upload/other/dbe585a9716bd417437be6b0d5695a6a.pdf</a>
  36. <a href="#" class="red removeThisFile"
  37. id="51">[delete file]</a>
  38. </li>
  39. <li class="file-id-52">- <a
  40. href="http://test.test/upload/other/585b8aa2cfd6a871eb3ed0e1c6d5e2b9.pdf"
  41. target="_blank">upload/other/585b8aa2cfd6a871eb3ed0e1c6d5e2b9.pdf</a>
  42. <a href="#" class="red removeThisFile"
  43. id="52">[delete file]</a>
  44. </li>
  45. </ul>
  46.  
  47.  
  48. $(".removeThisFile").click(function () {
  49. var id = $(this).attr("id");
  50. $('.file-id-' + id).hide();
  51. $.ajax({
  52. url: 'http://test.test/psCMS/removeOtherFile?id=52',
  53. type: 'get',
  54. dataType: 'json',
  55. _token: $('meta[name="_token"]').attr('content'),
  56. headers: {
  57. 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content')
  58. },
  59. cache: false,
  60. success: function (response) {
  61. $(this).hide();
  62. }
  63. });
  64.  
  65.  


Generalnie jquery poprawnie wysyła zapytanie do php (Laravel).
Problem występuje w kasowaniu plików. Pierwszy plik zostaje usunięty poprawnie. Usnięcie kolejnego pliki nie udaje się.
Podejrzewam iż mam nieważny token X-CSRF-TOKEN po usunięciu poprzedniego pliku.

W jaki sposób mogę naprawić ten problem?
  Forum: Przedszkole · Podgląd postu: #1241907 · Odpowiedzi: 3 · Wyświetleń: 285

northwest
Napisane: 17.05.2019, 20:23:38





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.
W jaki sposób przetłumaczyć maila z potwierdzeniem rejestracji w Laravelu 5.8?

Zrobiłem odpowiednie tłumaczenia w pl/pl.json:
  1. {
  2. "No offers were found matching the criteria": "Nie znaleziono ofeet spełniających kryteria wyszukiwania",
  3. "Confirm Password": "Potwierdź hasło",
  4. "E-Mail Address": "Adres e-mail",
  5. "Forgot Your Password?": "Nie pamiętasz hasła?",
  6. "If you did not request a password reset, no further action is required.": "Jeśli nie chcesz resetować hasła, zignoruj tę wiadomość.",
  7. "Login": "Zaloguj się",
  8. "Logout": "Wyloguj się",
  9. "Name": "Imię i nazwisko",
  10. "Password": "Hasło",
  11. "Register": "Zarejestruj się",
  12. "Remember Me": "Zapamiętaj mnie",
  13. "Reset Password": "Zresetuj hasło",
  14. "Reset Password Notification": "Zresetuj hasło",
  15. "Send Password Reset Link": "Wyślij link resetujący hasło",
  16. "You are receiving this email because we received a password reset request for your account.": "Otrzymujesz ten e-mail, ponieważ otrzymaliśmy prośbę o zresetowanie hasła dla Twojego konta.",
  17. "A fresh verification link has been sent to your email address.": "Link weryfikacyjny został wysłany na twój adres email.",
  18. "All rights reserved.": "Wszelkie prawa zastrzeżone",
  19. "Before proceeding, please check your email for a verification link.": "Zanim przejdziesz dalej, sprawdź swój adres email po link weryfikacyjny.",
  20. "Error": "Błąd",
  21. "Forbidden": "Zabronione",
  22. "Go Home": "Przejdź do strony głównej",
  23. "Hello!": "Cześć!",
  24. "hi": "hej",
  25. "If you did not receive the email": "Jeśli nie otrzymałeś(aś) emaila",
  26. "Oh no": "O nie",
  27. "Page Expired": "Strona wygasła",
  28. "Page Not Found": "Nie znaleziono takiej strony",
  29. "Please click the button below to verify your email address.": "Kliknij poniższy przycisk aby zweryfikować swój adres email.",
  30. "Service Unavailable": "Serwis niedostępny",
  31. "Sorry, the page you are looking for could not be found.": "Przepraszamy, strona której szukasz nie została znaleziona.",
  32. "Sorry, you are forbidden from accessing this page.": "Przepraszamy, nie masz dostępu do tej strony.",
  33. "Sorry, you are making too many requests to our servers.": "Przepraszamy, wykonujesz za dużo zapytań do naszych serwerów.",
  34. "Sorry, you are not authorized to access this page.": "Przepraszamy, nie jesteś uprawniony do dostępu do tej strony.",
  35. "Sorry, your session has expired. Please refresh and try again.": "Przepraszamy, sesja wygasła. Odśwież i spróbuj ponownie.",
  36. "Sorry, we are doing some maintenance. Please check back soon.": "Przepraszamy, trwają pracę nad stroną. Sprawdź ponownie później.",
  37. "Too Many Requests": "Za dużo zapytań",
  38. "Verify Email Address": "Zweryfikuj adres email",
  39. "Verify Your Email Address": "Zweryfikuj swój adres email",
  40. "Whoops!": "Ups!",
  41. "Whoops, something went wrong on our servers.": "Ups! Coś poszło nie tak na naszych serwerach.",
  42. "If you did not create an account, no further action is required.": "Jeśli to nie Ty utworzyłeś konto, to nie są wymagane żadne dodatkowe działania.",
  43. "Regards": "Pozdrawiamy",
  44. "If you’re having trouble clicking the": "Jeśli masz problem z kliknięciem",
  45. "button, copy and paste the URL below": " to skopiuj i wklej poniższy adres URL ",
  46. "into your web browser": " do przeglądarki internetowej"
  47.  
  48. }



ale pomimo tego w mailu mam coś takiego:

If you’re having trouble clicking the "Zweryfikuj adres email" button, copy and paste the URL below into your web browser: http://domain.test/email/verify/8?expires=...c76ee3b6dad6aeb


(mix polskiego i angielskiego) . Pozostała część maila jest ok (po polsku).

Co zrobiłem nie tak?
  Forum: Przedszkole · Podgląd postu: #1241626 · Odpowiedzi: 1 · Wyświetleń: 264

northwest
Napisane: 17.05.2019, 13:31:23





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Chyba coś nie do końca mi działa sad.gif

Dodałem nową klasę:
CheckRole

  1. use App\Role;
  2.  
  3. use Closure;
  4.  
  5. class CheckRole
  6. {
  7. /**
  8.   * Handle an incoming request.
  9.   *
  10.   * @param \Illuminate\Http\Request $request
  11.   * @param \Closure $next
  12.   * @return mixed
  13.   */
  14. public function handle($request, Closure $next, $role)
  15. {
  16. if (! $request->user()->hasRole($role)) {
  17. return redirect()->route('home');
  18. }
  19.  
  20. return $next($request);
  21. }
  22. }



I teraz do routera zrobiłem coś takiego:
  1. // użytkownicy niezalogowani
  2. Route::get('/', 'FrontendController@index')->name('home');
  3.  
  4. // użytkownicy zalogowani posiadający rolę: user i userPremium
  5. Route::group(['prefix' => 'panel', 'middleware' => 'auth'], function () {
  6. Route::get('/', 'BackendController@index')->name('adminHome')->middleware('role:user,role:userPremium');
  7. });
  8.  
  9. // użytkownicy zalogowani posiadający rolę: admin
  10. Route::group(['prefix' => 'cms', 'middleware' => 'auth'], function () {
  11. Route::get('/', 'CMSController@cms')->name('index')->middleware('role:admin');
  12. });



Po uruchomieniu tego kodu otrzymuję:
ReflectionException (-1)
Class role does not exist

w $reflector = new ReflectionClass($concrete);



Screen: https://ibb.co/ZxgDZRj



Co jeszcze muszę dorobić?
  Forum: Przedszkole · Podgląd postu: #1241610 · Odpowiedzi: 3 · Wyświetleń: 398

northwest
Napisane: 17.05.2019, 12:39:22





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.
Od paru dni uczę się Laravel i natrafiłem na następujący problem.
W swojej aplikacji chciałbym mieć 3 poziomy dostępu:
1. użytkownik niezalogowany
2. użytkownik zalogowany (rola: user i userPremium)
3. użytkownik administrator (rola: admin)

W swoim projekcie wykorzystuję wbudowane w Laravel funkcje rejestracji i logowania.


Mam następujące migracje:

  1. Schema::create('users', function (Blueprint $table) {
  2. $table->bigIncrements('id');
  3. $table->bigInteger('company_id')->unsigned();
  4. $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
  5. $table->boolean('enable')->default(0);
  6. $table->string('name', 120)->nullable();
  7. $table->string('surname', 120)->nullable();
  8. $table->string('email', 120)->unique();
  9. $table->timestamp('email_verified_at')->nullable();
  10. $table->string('password');
  11. $table->bigInteger('counter')->default(0);
  12. $table->string('url_address', 160);
  13. $table->boolean('isCompany')->default(0);
  14. $table->boolean('isMailing')->default(0);
  15. $table->text('content')->nullable();
  16. $table->string('nip1', 12)->nullable();
  17. $table->string('business1', 120)->nullable();
  18. $table->string('phone1', 60)->nullable();
  19. $table->string('street1', 150)->nullable();
  20. $table->string('number1', 8)->nullable();
  21. $table->string('postal_code1', 12)->nullable();
  22. $table->string('city1', 100)->nullable();
  23. $table->bigInteger('country_id1')->default(0);
  24. $table->bigInteger('provincial_id1')->default(0);
  25. $table->string('nip2', 12)->nullable();
  26. $table->string('business2', 120)->nullable();
  27. $table->string('phone2', 60)->nullable();
  28. $table->string('street2', 150)->nullable();
  29. $table->string('number2', 8)->nullable();
  30. $table->string('postal_code2', 12)->nullable();
  31. $table->string('city2', 100)->nullable();
  32. $table->bigInteger('country_id2')->default(0);
  33. $table->bigInteger('provincial_id2')->default(0);
  34. $table->string('nip3', 12)->nullable();
  35. $table->string('business3', 120)->nullable();
  36. $table->string('phone3', 60)->nullable();
  37. $table->string('street3', 150)->nullable();
  38. $table->string('number3', 8)->nullable();
  39. $table->string('postal_code3', 12)->nullable();
  40. $table->string('city3', 100)->nullable();
  41. $table->bigInteger('country_id3')->default(0);
  42. $table->bigInteger('provincial_id3')->default(0);
  43. $table->decimal('cash', 9, 2)->default(0);
  44. $table->decimal('lng', 10, 8)->default(0);
  45. $table->decimal('lat', 10, 8)->default(0);
  46. $table->boolean('enable_map')->default(0);
  47. $table->rememberToken();
  48. $table->timestamps();
  49. $table->engine = "InnoDB";
  50. });
  51.  
  52.  
  53.  
  54. Schema::create('roles', function (Blueprint $table) {
  55. $table->bigIncrements('id');
  56. $table->string('name');
  57. $table->engine = "InnoDB";
  58. });
  59.  
  60. Schema::create('role_user', function (Blueprint $table) {
  61. $table->bigInteger('user_id')->unsigned();
  62. $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
  63. $table->bigInteger('role_id')->unsigned();
  64. $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
  65. $table->engine = "InnoDB";
  66. });
  67.  
  68.  
  69. DB::table('roles')->insert([
  70. 'name' => $faker->unique()->randomElement(['admin', 'user', 'userPremium']),
  71. ]);
  72.  
  73.  


Mój router wygląda następująco (web.php):
  1. // użytkownicy niezalogowani
  2. Route::get('/', 'FrontendController@index')->name('home');
  3.  
  4. // użytkownicy zalogowani posiadający rolę: user i userPremium
  5. Route::group(['prefix' => 'panel', 'middleware' => 'auth'], function () {
  6. Route::get('/', 'BackendController@index')->name('adminHome')->middleware('verified');
  7. });
  8.  
  9. // użytkownicy zalogowani posiadający rolę: admin
  10. Route::group(['prefix' => 'cms', 'middleware' => 'auth'], function () {
  11. Route::get('/', 'CMSController@cms')->name('index')->middleware('verified');
  12. });
  13.  




Model User.php wygląda następująco:
  1. class User extends Authenticatable implements MustVerifyEmail
  2. {
  3. use Notifiable;
  4. use psCMS\Presenters\UserPresenter;
  5.  
  6. public static $roles = [];
  7.  
  8. /**
  9.   * The attributes that are mass assignable.
  10.   *
  11.   * @var array
  12.   */
  13.  
  14. protected $fillable = ['company_id', 'enable', 'name', 'surname', 'email', 'email_verified_at', 'password', 'counter', 'url_address', 'isCompany', 'isMailing', 'content', 'nip1', 'business1', 'phone1', 'street1', 'number1', 'postal_code1', 'city1', 'country_id1', 'provincial_id1', 'nip2', 'business2', 'phone2', 'street2', 'number2', 'postal_code2', 'city2', 'country_id2', 'provincial_id2', 'nip3', 'business3', 'phone3', 'street3', 'number3', 'postal_code3', 'city3', 'country_id3', 'provincial_id3', 'cash', 'lng', 'lat', 'enable_map', 'remember_token', 'created_at', 'updated_at', 'last_login_at', 'last_login_ip' ];
  15.  
  16.  
  17. /**
  18.   * The attributes that should be hidden for arrays.
  19.   *
  20.   * @var array
  21.   */
  22. protected $hidden = [
  23. 'password', 'remember_token',
  24. ];
  25.  
  26.  
  27. public function photos()
  28. {
  29. return $this->morphMany('App\Photo', 'photoable');
  30. }
  31.  
  32.  
  33. public function roles()
  34. {
  35. return $this->belongsToMany('App\Role');
  36. }
  37.  
  38.  
  39. public function hasRole(array $roles)
  40. {
  41.  
  42. foreach($roles as $role)
  43. {
  44.  
  45. if(isset(self::$roles[$role]))
  46. {
  47. if(self::$roles[$role]) return true;
  48.  
  49. }
  50. else
  51. {
  52. self::$roles[$role] = $this->roles()->where('name', $role)->exists();
  53. if(self::$roles[$role]) return true;
  54. }
  55.  
  56. }
  57.  
  58.  
  59. return false;
  60.  
  61. }
  62.  
  63. }
  64.  


W jaki sposób mogę to zrobić?
1. Użytkownik niezalogowany nie może wejść zarówno do route panel oraz admin
2. Użytkownik zalogowany jako user lub userPremium może wejść tylko do route panel - nie może wejść do route admin
3. Użytkownik zalogowany jako user admin może wejść tylko do route admin - nie może wejść do route panel

W jaki sposób to zrobić?







  Forum: Przedszkole · Podgląd postu: #1241608 · Odpowiedzi: 3 · Wyświetleń: 398

northwest
Napisane: 10.05.2019, 14:15:21





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

nie działa sad.gif tylko nie łapię dlaczego:/ jest to dodane do węzła w routingu to powinno działać?
  Forum: Przedszkole · Podgląd postu: #1240711 · Odpowiedzi: 9 · Wyświetleń: 488

northwest
Napisane: 10.05.2019, 13:59:23





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Tak, chciałbym mieć to oznaczane z poziomu routingu.


czyli nie mogę tego zrobić w taki sposób:

  1. Route::get('/cities', 'BackendController@cities')->name('cities.index')->middleware('verified');

?
  Forum: Przedszkole · Podgląd postu: #1240709 · Odpowiedzi: 9 · Wyświetleń: 488

northwest
Napisane: 10.05.2019, 13:48:16





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

kurczę, chyba nie wiem co skopałem sad.gif
  Forum: Przedszkole · Podgląd postu: #1240707 · Odpowiedzi: 9 · Wyświetleń: 488

northwest
Napisane: 10.05.2019, 11:07:48





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Dziękuje bardzo smile.gif
A w jaki sposób zablokować możliwość zalogowania użytkownika bez weryfikacji wcześniejszej (kliknięcia linka z maila)?

Mam taki web.php:
  1. Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () {
  2. Route::get('/', 'BackendController@index')->name('adminHome')->middleware('verified');
  3. Route::get('/myObjects', 'BackendController@myObjects')->name('myObjects')->middleware('verified');
  4. Route::get('/saveObject', 'BackendController@saveObject')->name('saveObject')->middleware('verified');
  5. Route::get('/profile', 'BackendController@profile')->name('profile')->middleware('verified');
  6. Route::get('/saveRoom', 'BackendController@saveRoom')->name('saveRoom')->middleware('verified');
  7. Route::get('/cities', 'BackendController@cities')->name('cities.index')->middleware('verified');
  8. });
  9.  
  10.  
  11. Auth::routes(['verify' => true]);
  12.  



Pomimo iż użytkownik ma niezweryfikowany email (pusta kolumna email_verified_at w bazie) - to mogę się na takie konto zalogować sad.gif
  Forum: Przedszkole · Podgląd postu: #1240702 · Odpowiedzi: 9 · Wyświetleń: 488

northwest
Napisane: 9.05.2019, 12:22:25





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.
Od. paru dni uczę się Laravela i napotkałem na mały problem. Korzystam z wbudowanej w Laravela funkcji rejestracji i logowania.
Po zarejestrowaniu nowego użytkownika mam opcję wymagania aktywacji maila (na mail użytkownika wysyłany jest link aktywacyjny). To działa poprawnie.

Problemem jest dla mnie to, że po zarejestrowaniu użytkownik jest od razu logowany. Chciałbym żeby użytkownik do czasu aktywacji maila nie mógł się zalogować.

W jaki sposób mogę to zrobić?
  Forum: Przedszkole · Podgląd postu: #1240666 · Odpowiedzi: 9 · Wyświetleń: 488

northwest
Napisane: 29.04.2019, 21:12:44





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie smile.gif
Jest to moje pierwsze starcie z Dockerem smile.gif
Potrzebuję środowisko do pracy z php (Symfony i Laravel)

Mam taki plik:


  1. version: "3.1"
  2. services:
  3.  
  4. memcached:
  5. image: memcached:alpine
  6. container_name: sample-memcached
  7.  
  8. redis:
  9. image: redis:alpine
  10. container_name: sample-redis
  11.  
  12. image: mysql:8.0
  13. container_name: sample-mysql
  14. working_dir: /application
  15. volumes:
  16. - .:/application
  17. environment:
  18. - MYSQL_ROOT_PASSWORD= mysecretpass
  19. - MYSQL_DATABASE=sample
  20. - MYSQL_USER=root
  21. - MYSQL_PASSWORD= mysecretpass
  22. ports:
  23. - "8082:3306"
  24.  
  25. mariadb:
  26. image: mariadb:10.4
  27. container_name: sample-mariadb
  28. working_dir: /application
  29. volumes:
  30. - .:/application
  31. environment:
  32. - MYSQL_ROOT_PASSWORD= mysecretpass
  33. - MYSQL_DATABASE=sample
  34. - MYSQL_USER=root
  35. - MYSQL_PASSWORD= mysecretpass
  36. ports:
  37. - "8083:3306"
  38.  
  39. postgres:
  40. image: postgres:11.1-alpine
  41. container_name: sample-postgres
  42. working_dir: /application
  43. volumes:
  44. - .:/application
  45. environment:
  46. - POSTGRES_USER=root
  47. - POSTGRES_PASSWORD= mysecretpass
  48. - POSTGRES_DB=sample
  49. ports:
  50. - "8084:5432"
  51.  
  52. elasticsearch:
  53. image: elasticsearch:6.5.4
  54. container_name: sample-elasticsearch
  55.  
  56. webserver:
  57. image: nginx:alpine
  58. container_name: sample-webserver
  59. working_dir: /application
  60. volumes:
  61. - .:/application
  62. - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
  63. ports:
  64. - "8080:80"
  65.  
  66. php-fpm:
  67. build: phpdocker/php-fpm
  68. container_name: sample-php-fpm
  69. working_dir: /application
  70. volumes:
  71. - .:/application
  72. - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.3/fpm/conf.d/99-overrides.ini
  73.  
  74.  


Chciałbym dodać do niego (w najnowszych wersjach):
- phpmyadmin,
- pgadmin

W jaki sposób mogę to zrobić?

Dockera uruchamiam za pomocą: docker-compose up -d
Wyłączam Dockera za pomocą: docker-compose stop

Czy dane wprowadzone do MySQL, zapisane zdjęcia itp będą widoczne po restarcie kontenera?
  Forum: Przedszkole · Podgląd postu: #1240386 · Odpowiedzi: 0 · Wyświetleń: 228

northwest
Napisane: 29.04.2019, 15:10:16





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.
Czy możecie polecić jakieś ciekawe komponenty do VS Code do Php (Symfony/Laravel) oraz JS/Node?
  Forum: Przedszkole · Podgląd postu: #1240370 · Odpowiedzi: 0 · Wyświetleń: 178

northwest
Napisane: 25.04.2019, 22:24:26





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam serdecznie.
Znacie może jakiś sposób na zabezpieczenie danych w bazie (myśle nad szyfrowaniem ich)?
Możecie polecić jakiś komponent do php/Symfony?
  Forum: Przedszkole · Podgląd postu: #1240298 · Odpowiedzi: 1 · Wyświetleń: 583

northwest
Napisane: 3.04.2019, 17:24:35





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Witam.
Czym się różni Controller od Service w Symfony?smile.gif

Nie bardzo widzę różnicę sad.gif
  Forum: Przedszkole · Podgląd postu: #1239888 · Odpowiedzi: 2 · Wyświetleń: 334

northwest
Napisane: 6.04.2019, 07:51:55





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Czyli tak naprawdę to jest rozbicie controllera na samo przekazywanie "poleceń" do serwisów (w których odbywa się cała logika/operacje)?

A czym są w takim razie "fasady"?
  Forum: Przedszkole · Podgląd postu: #1239925 · Odpowiedzi: 2 · Wyświetleń: 334

northwest
Napisane: 7.05.2018, 12:57:43





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

też mi się tak wydaje (że z php będzie łatwiej) smile.gif
tylko ilość nauki java vs php oop/mvc/symfony nie będzie podobna?
  Forum: Hydepark · Podgląd postu: #1232916 · Odpowiedzi: 10 · Wyświetleń: 1 326

northwest
Napisane: 7.05.2018, 12:12:30





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

Generalnie pracuje w php i w tym się czuje dobrze. Java to póki co dla mnie kupa "krzaczków" wink.gif

15k - przyjąłem jako "magiczną liczbę" w IT wink.gif

Myślę że np. jak topowy senior w php zarabia przykładowo 15k, a topowy senior w java 30k - to regular w php nie dostanie wiecej niż np. 7 - a w javie np. 15 (przykładowo).
Nie wiem na ile mój sposób myślenia jest racjonalny w tym przypadku smile.gif Zdaje sobie sprawę że na początku zarobię dużo mniej, bo mam "złe" doświadczenie, ale też chciałbym móc na spokojnie się utrzymać.

Jestem z Trójmiasta i tutaj mamy dość sporo firm od javy, od php wydaje mi się że jest tu stosunkowo nie dużo.

Myślisz że lepiej w moim przypadku iść w java czy w php? Ta obiektówka to raczej zmiana sposobu myślenia i chyba szybko uda mi się to ogarnąć.

Zastanawiam się tylko czy ilość nauki w zestawieniu z pewnością pracy i wynagrodzeniem będzie lepsza w moim przypadku w javie czy php.
Nie jestem tylko pewien drogi którą powinienem podążyć smile.gif
  Forum: Hydepark · Podgląd postu: #1232911 · Odpowiedzi: 10 · Wyświetleń: 1 326

northwest
Napisane: 7.05.2018, 10:31:52





Grupa: Zarejestrowani
Postów: 788
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----

"Karta mieszkańca" takie rzeczy lepiej trzymac w stringsach.

Witajcie.
Chciałbym się poradzić. Od ponad 8 lat pracuję jako programista php w swojej firmie, jednak region w którym mieszkam, robi się coraz cięższy.
Dotychczas napisałem wiele stron internetowych, CMS, gry przeglądarkowe, aplikacje dedykowane, portale społecznościowe itp, itp.
Jest tego naprawdę sporo. W związku z planowanym powiększeniem rodziny planuję się ustabilizować (niestety ze zleceniami bywa różnie).
Planuję poszukać czegoś na b2b lub etatu.
Moje problemy:
- nie znam żadnego frameworka php,
- aplikacje, bazy itp. projektowałem sam - więc pewnie do poziomu "pro" dużo temu brakuje,
- pisałem głównie strukturalnie (obiektówka mi kiedyś nie podeszła).

Zastanawiam się czy lepiej nadrobić zaległości w php i nauczyć się composera, mvc, php7 - czy lepiej od podstaw nauczyć się np. javy lub c#?
Wiele lat temu poszedłem we własną firmę, bo zarobki w php były bardzo słabe.
Teraz widzę, że pojawia się sporo ogłoszeń z kwotami nawet powyżej 15k - więc to się chyba powoli zrównuje z javą itp? Jak myślicie?

Na ten moment biorę pod uwagę zarówno aspekt "przyszłościowy" (chcę pracować w technologii, która pozwoli mi się na spokojnie utrzymać), jak i finansowy (wiadomo, życie i rodzina kosztuje).
Obie technologie są moim zdaniem bezpieczne pod względem przyszłości, jednak biorąc pod uwagę ilość nauki, jaka jest przede mną i zarobki - to w którą technologię sugerowalibyście pójść?

PHP 7 wydaje mi się już na tyle dojrzałą i dobrą technologią że może konkurować pod względem ilości pracy z np. javą?
  Forum: Hydepark · Podgląd postu: #1232907 · Odpowiedzi: 10 · Wyświetleń: 1 326

33 Stron V   1 2 3 > » 

New Posts  Nowe odpowiedzi
No New Posts  Brak nowych odpowiedzi
Hot topic  Popularny temat (Nowe)
No new  Popularny temat (Brak nowych)
Poll  Sonda (Nowe)
No new votes  Sonda (Brak nowych)
Closed  Zamknięty temat
Moved  Przeniesiony temat
 

RSS Wersja Lo-Fi Aktualny czas: 16.04.2024 - 14:10